simplify main function
1 files changed, 7 insertions(+), 9 deletions(-)

M src/main.rs
M src/main.rs +7 -9
@@ 7,14 7,12 @@ mod options;
 mod revlogs;
 
 fn main() {
-    match options::Rug::from_args() {
-        options::Rug::Log {} => match commands::hg_log() {
-            Ok(_) => {}
-            Err(e) => println!("{}", e),
-        },
-        options::Rug::Status {} => match commands::hg_status() {
-            Ok(_) => {}
-            Err(e) => println!("{}", e),
-        },
+    let res = match options::Rug::from_args() {
+        options::Rug::Log {} => commands::hg_log(),
+        options::Rug::Status {} => commands::hg_status(),
+    };
+    match res {
+        Ok(_) => {}
+        Err(e) => println!("{}", e),
     }
 }