From 3613193f2ed2835bdd4a42e85211620d138b621e Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sun, 8 Dec 2019 03:39:49 +0100 Subject: use if on boolean instead of match --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5de9d56..6c8c723 100644 --- a/src/main.rs +++ b/src/main.rs @@ -283,9 +283,10 @@ fn run() -> MainResult<()> { .get_matches(); let mut api = Api::new(cache::FileCache::new()); - let build = match matches.is_present("chatlink") { - false => run_searching(&mut api, &matches)?, - true => run_chatlink(&mut api, &matches)?, + let build = if matches.is_present("chatlink") { + run_chatlink(&mut api, &matches)? + } else { + run_searching(&mut api, &matches)? }; println!("Chat code: {}", build.chatlink()); -- cgit v1.2.3