Skip to content

Commit d9ecd3d

Browse files
committed
rust: macros: module: avoid redundant closure
This triggered a new Clippy lint in 1.57.0. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent b232247 commit d9ecd3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/macros/module.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@ fn try_simple_param_val(
148148
param_type: &str,
149149
) -> Box<dyn Fn(&mut token_stream::IntoIter) -> Option<String>> {
150150
match param_type {
151-
"bool" => Box::new(|param_it| try_ident(param_it)),
151+
"bool" => Box::new(try_ident),
152152
"str" => Box::new(|param_it| {
153153
try_byte_string(param_it)
154154
.map(|s| format!("kernel::module_param::StringParam::Ref(b\"{}\")", s))
155155
}),
156-
_ => Box::new(|param_it| try_literal(param_it)),
156+
_ => Box::new(try_literal),
157157
}
158158
}
159159

0 commit comments

Comments
 (0)