about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/path.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-18 12:45:56 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2022-12-19 00:04:28 +0100
commit1da4a499122f59201cf761b79f9e8c6ded1cb91d (patch)
treefceb5fab451f7498a5b942da7d1e9291ba0a2724 /compiler/rustc_parse/src/parser/path.rs
parent48b3c4612681ba7828880aa9e675452c62714bbf (diff)
downloadrust-1da4a499122f59201cf761b79f9e8c6ded1cb91d.tar.gz
rust-1da4a499122f59201cf761b79f9e8c6ded1cb91d.zip
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
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
-rw-r--r--compiler/rustc_parse/src/parser/path.rs3
1 files changed, 1 insertions, 2 deletions
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(),