From 2c5d6c5b4e2197dbb197b18d4f2638bceadb295a Mon Sep 17 00:00:00 2001 From: Rollie Ma Date: Sun, 2 Jun 2024 17:57:54 -0700 Subject: [PATCH] fix linter error from belt config (#51) --- belt/src/config.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/belt/src/config.rs b/belt/src/config.rs index ff881b2..7f6362a 100644 --- a/belt/src/config.rs +++ b/belt/src/config.rs @@ -72,10 +72,12 @@ where } pub fn add(&mut self, to_add: &str) -> Result<()> { - match to_add.parse::().and_then(|_| { + let result = to_add.parse::().and_then(|_| { self.store.timezones.push(to_add.to_string()); confy::store(&self.app, None, &self.store).map_err(|err| format!("{}", err)) - }) { + }); + + match result { Ok(_) => writeln!( self.out, "{}",