Skip to content

Instantly share code, notes, and snippets.

@mkomitee
Created May 20, 2015 20:32
Show Gist options
  • Save mkomitee/d22b845dd63d74702b23 to your computer and use it in GitHub Desktop.
Save mkomitee/d22b845dd63d74702b23 to your computer and use it in GitHub Desktop.
exit nonzero
fn main() {
let mut exit_code = 0;
{
// real work which may mutate exit_code
exit_code = 1;
}
process::exit(exit_code);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment