From 87eac50eb7640720fdc75b8a8bd3116bfb82f1ed Mon Sep 17 00:00:00 2001 From: Perma Alesheikh Date: Tue, 9 Jan 2024 14:34:05 +0330 Subject: [PATCH] remove comparison with boolean value Reasons: - The bool value itself is enough for the filter expression. - Simplifies the expression. Signed-off-by: Perma Alesheikh --- src/config/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index faea089..0912b86 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -152,7 +152,7 @@ impl TomlConfig { .find_map(|(name, account)| { account .default - .filter(|default| *default == true) + .filter(|default| *default) .map(|_| (name.to_owned(), account.clone())) }) .ok_or_else(|| anyhow!("cannot find default account")),