Skip to content

Commit

Permalink
fix(open): use result
Browse files Browse the repository at this point in the history
I wonder why that was not shown when I compiled it
  • Loading branch information
Byron committed Jul 8, 2015
1 parent a4c3a35 commit 25c0e39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ fn main() {
match env::args().skip(1).next() {
Some(arg) => arg,
None => {
writeln!(stderr(), "usage: open <path-or-url>");
writeln!(stderr(), "usage: open <path-or-url>").ok();
process::exit(1);
}
};

if let Err(err) = open::that(&path_or_url) {
writeln!(stderr(), "An error occourred when opening '{}': {}", path_or_url, err);
writeln!(stderr(), "An error occourred when opening '{}': {}", path_or_url, err).ok();
process::exit(3);
}
}

0 comments on commit 25c0e39

Please sign in to comment.