In #Rustlang you can return std::process::ExitCode
from main()
.
It's better than calling std::process::exit()
, because it allows the program to run destructors, which may be needed to flush pending I/O or print buffered logs.
play.rust-lang.org/?gist=56c6f…
doc.rust-lang.org/stable/std/p…
ExitCode in std::process - Rust
This type represents the status code the current process can return to its parent under normal termination.doc.rust-lang.org
This entry was edited (1 year ago)