Warning
This post was published 35 days ago. The information described in this article may have changed.
The signature of my main
function is fn main()->Result<(), Box<dyn std::error::Error>>
.
However for different returned Error
s, the exit code are all 1
. And for Ok(()), the exit code is surely 0
.
I know that there IS a method that can do this mapping, based on std::process::exit
.
But is there a better way to do this?
2 posts - 2 participants
🏷️ rust_feed