summaryrefslogtreecommitdiff
path: root/common/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/config.rs')
-rw-r--r--common/src/config.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/src/config.rs b/common/src/config.rs
index a601855..06f4b6d 100644
--- a/common/src/config.rs
+++ b/common/src/config.rs
@@ -76,9 +76,7 @@ impl TalerConfig {
}
fn non_zero_option(&self, name: &str) -> Option<u32> {
- nb(self.section(), name)
- .and_then(|nb| (nb != 0).then(|| Some(nb)))
- .unwrap_or(None)
+ nb(self.section(), name).filter(|nb| *nb != 0)
}
}