aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 183079a..c6e7054 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -57,11 +57,12 @@ fn main() {
return
}
- let browser = if opt_matches.opt_present("b") {
- opt_matches.opt_str("b")
- } else {
- print_usage(opts);
- return
+ let browser = match opt_matches.opt_str("b") {
+ Some(b) => b,
+ None => {
+ print_usage(opts);
+ return
+ },
};
open_stream().unwrap_or_else(|e| {