Skip to main content


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…

This entry was edited (1 year ago)