summaryrefslogtreecommitdiff
path: root/common/src/config.rs
diff options
context:
space:
mode:
authorAntoine A <>2024-03-18 19:44:50 +0100
committerAntoine A <>2024-03-18 19:44:50 +0100
commit80ded0febe5acbfa64cef3d84846b4a1300ea97f (patch)
tree2fcea96184c7af490a8a1cd27ba556b0cb8416f1 /common/src/config.rs
parent635e0e1d0ce6773f7bea4b4fed7c22f614ba2829 (diff)
downloaddepolymerization-80ded0febe5acbfa64cef3d84846b4a1300ea97f.tar.gz
depolymerization-80ded0febe5acbfa64cef3d84846b4a1300ea97f.tar.bz2
depolymerization-80ded0febe5acbfa64cef3d84846b4a1300ea97f.zip
Update dependencies and clean codeHEADmaster
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)
}
}