From 08f5df1f0a2e22876a5b49a4f9e2e05a61df882a Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 26 Oct 2026 21:56:20 +0100 Subject: make clippy happy again --- src/config/mod.rs | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'src/config/mod.rs') diff --git a/src/config/mod.rs b/src/config/mod.rs index 5edf78b..c8bfa9f 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -376,12 +376,12 @@ impl Settings { if let Some(url) = &self.mycelium_rest_url { url::Url::parse(url).with_context(|| format!("mycelium-rest-url {url:?}"))?; } - if self.mycelium_rest_url.is_some() { - if let Some((name, _)) = self.supervised_only().iter().find(|(_, set)| *set) { - bail!( - "{name} is for a supervised Mycelium daemon and can't be combined with mycelium-rest-url" - ); - } + if self.mycelium_rest_url.is_some() + && let Some((name, _)) = self.supervised_only().iter().find(|(_, set)| *set) + { + bail!( + "{name} is for a supervised Mycelium daemon and can't be combined with mycelium-rest-url" + ); } // A private network has both; one alone would be ignored or invented. if self.mycelium_network_key_file.is_some() != self.mycelium_network_name.is_some() { @@ -585,16 +585,12 @@ pub(crate) fn overlay(layer: &mut Layer, name: String, entry: Entry, how: Overla let earlier = layer .get(other) .is_some_and(|previous| previous.origin.provenance != entry.origin.provenance); - if earlier { - if let Some(previous) = layer.remove(other) { - log( - &format!( - "{name} can't be combined with {other}; dropped the earlier value" - ), - other, - &previous, - ); - } + if earlier && let Some(previous) = layer.remove(other) { + log( + &format!("{name} can't be combined with {other}; dropped the earlier value"), + other, + &previous, + ); } } } -- cgit v1.3.1