aboutsummaryrefslogtreecommitdiff
path: root/arg_picker/src/picker/patterns.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-10 16:52:19 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-10 16:52:19 +0800
commit02e07a18fcb3af9319c271f6e41d5b7785e2e436 (patch)
treeff76916c254e87a7aadc5cb4dfd2134eaf4f03fc /arg_picker/src/picker/patterns.rs
parent03b487f0f93ac32835149d4c1a0fb420341134f8 (diff)
style: satisfy clippy pedantic and nursery lints
Diffstat (limited to 'arg_picker/src/picker/patterns.rs')
-rw-r--r--arg_picker/src/picker/patterns.rs11
1 files changed, 3 insertions, 8 deletions
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<F>(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<F>(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<F>(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)
}