From 1da4a499122f59201cf761b79f9e8c6ded1cb91d Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sun, 18 Dec 2022 12:45:56 +0100 Subject: clippy::complexity fixes filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool --- compiler/rustc_parse/src/parser/path.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/rustc_parse/src') diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 2d432e3f5bd..5333d3b8587 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -277,8 +277,7 @@ impl<'a> Parser<'a> { if let Some(arg) = args .iter() .rev() - .skip_while(|arg| matches!(arg, AngleBracketedArg::Constraint(_))) - .next() + .find(|arg| !matches!(arg, AngleBracketedArg::Constraint(_))) { err.span_suggestion_verbose( arg.span().shrink_to_hi(), -- cgit 1.4.1-3-g733a5