summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2020-10-20 21:28:40 +0200
committerCanop <cano.petrole@gmail.com>2020-10-20 21:28:40 +0200
commit56a82dac6900ae005ffd6b2a2574765d65a14072 (patch)
tree7a725e94759c98c6cd3f3c9d0699294e1f6695c7 /src/cli.rs
parent18cb0b6b8318886b7649791f057d10ca90c67df3 (diff)
keep tree options when going through not tree states
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 28098e5..38741a1 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -259,8 +259,5 @@ pub fn ask_authorization() -> Result<bool, ProgramError> {
let mut answer = String::new();
io::stdin().read_line(&mut answer)?;
let answer = answer.trim();
- Ok(match answer {
- "n" | "N" => false,
- _ => true,
- })
+ Ok(!matches!(answer, "n" | "N"))
}