aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2019-12-08 03:39:49 +0100
committerDaniel Schadt <kingdread@gmx.de>2019-12-08 03:39:49 +0100
commit3613193f2ed2835bdd4a42e85211620d138b621e (patch)
tree633c880b54baa59bab813a62191c2105ff1d8b73
parent11d98ad9fafc79cf6ef92ef1e7659d62e54d4269 (diff)
downloadkondou-3613193f2ed2835bdd4a42e85211620d138b621e.tar.gz
kondou-3613193f2ed2835bdd4a42e85211620d138b621e.tar.bz2
kondou-3613193f2ed2835bdd4a42e85211620d138b621e.zip
use if on boolean instead of match
-rw-r--r--src/main.rs7
1 files 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());