From 57fb0ebe108a04c70b16166d9370e32bc2baad73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Wed, 17 Jul 2024 08:48:51 +0200 Subject: [PATCH] Fix clippy complaints --- src/rule/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rule/mod.rs b/src/rule/mod.rs index 211f88d..229ae25 100644 --- a/src/rule/mod.rs +++ b/src/rule/mod.rs @@ -156,7 +156,7 @@ impl TryCopyTo for FilterRule { self.to.try_copy_to(&mut pf_rule.dst)?; self.label .try_copy_to(&mut pf_rule.label) - .map_err(|reason| ErrorInternal::InvalidLabel(reason))?; + .map_err(ErrorInternal::InvalidLabel)?; self.user.copy_to(&mut pf_rule.uid); self.group.copy_to(&mut pf_rule.gid); if let Some(icmp_type) = self.icmp_type { @@ -235,7 +235,7 @@ impl TryCopyTo for RedirectRule { self.to.try_copy_to(&mut pf_rule.dst)?; self.label .try_copy_to(&mut pf_rule.label) - .map_err(|reason| ErrorInternal::InvalidLabel(reason))?; + .map_err(ErrorInternal::InvalidLabel)?; self.user.copy_to(&mut pf_rule.uid); self.group.copy_to(&mut pf_rule.gid);