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);