From 02e07a18fcb3af9319c271f6e41d5b7785e2e436 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 10 Aug 2026 16:52:19 +0800 Subject: style: satisfy clippy pedantic and nursery lints --- arg_picker/src/picker/patterns.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'arg_picker/src/picker/patterns.rs') diff --git a/arg_picker/src/picker/patterns.rs b/arg_picker/src/picker/patterns.rs index 5806605..7058d47 100644 --- a/arg_picker/src/picker/patterns.rs +++ b/arg_picker/src/picker/patterns.rs @@ -33,8 +33,7 @@ internal_repeat!(1..=32 => { #[allow(clippy::type_complexity)] pub fn or(mut self, func: F) -> Self where - F: FnMut() -> T$, - F: 'static, + F: 'static + FnMut() -> T$, { self.default_$ = Some(Box::new(func)); self @@ -65,8 +64,7 @@ internal_repeat!(1..=32 => { /// pub fn or_route(mut self, func: F) -> Self where - F: FnMut() -> Route, - F: 'static, + F: 'static + FnMut() -> Route, { self.route_$ = Some(Box::new(func)); self @@ -110,8 +108,7 @@ internal_repeat!(1..=32 => { #[allow(clippy::type_complexity)] pub fn post(mut self, func: F) -> Self where - F: FnMut(T$) -> T$, - F: 'static, + F: 'static + FnMut(T$) -> T$, { self.post_$ = Some(Box::new(func)); self @@ -167,7 +164,6 @@ internal_repeat!(1..32 => { where N: Pickable<'a>, F: FnMut() -> N + 'static, - F: 'static, { self.pick(arg).or(func) } @@ -197,7 +193,6 @@ internal_repeat!(1..32 => { where N: Pickable<'a>, F: FnMut() -> Route + 'static, - F: 'static, { self.pick(arg).or_route(func) } -- cgit