fix clippy::toplevel_ref_arg and ::manual_map

This commit is contained in:
Matthias Krüger 2023-04-15 20:18:30 +02:00
parent e6e956dade
commit 543f8bc38c
12 changed files with 42 additions and 70 deletions

View file

@ -141,13 +141,7 @@ fn parse_args<'a>(ecx: &mut ExtCtxt<'a>, sp: Span, tts: TokenStream) -> PResult<
args: args
.named_args()
.iter()
.filter_map(|a| {
if let Some(ident) = a.kind.ident() {
Some((a, ident))
} else {
None
}
})
.filter_map(|a| a.kind.ident().map(|ident| (a, ident)))
.map(|(arg, n)| n.span.to(arg.expr.span))
.collect(),
});