diff options
author | Antoine A <> | 2024-03-18 19:44:50 +0100 |
---|---|---|
committer | Antoine A <> | 2024-03-18 19:44:50 +0100 |
commit | 80ded0febe5acbfa64cef3d84846b4a1300ea97f (patch) | |
tree | 2fcea96184c7af490a8a1cd27ba556b0cb8416f1 /common/src/config.rs | |
parent | 635e0e1d0ce6773f7bea4b4fed7c22f614ba2829 (diff) | |
download | depolymerization-80ded0febe5acbfa64cef3d84846b4a1300ea97f.tar.gz depolymerization-80ded0febe5acbfa64cef3d84846b4a1300ea97f.tar.bz2 depolymerization-80ded0febe5acbfa64cef3d84846b4a1300ea97f.zip |
Diffstat (limited to 'common/src/config.rs')
-rw-r--r-- | common/src/config.rs | 4 |
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) } } |