]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/trait_bounds.rs
Auto merge of #71780 - jcotton42:string_remove_matches, r=joshtriplett
[rust.git] / src / tools / clippy / clippy_lints / src / trait_bounds.rs
index d4acf8df46d8a5323d64613c38de7ef7abbb8dd1..daff5f81e8c34c926a830089025eff5294a7d540 100644 (file)
@@ -168,8 +168,7 @@ fn check_trait_bound_duplication(cx: &LateContext<'_>, gen: &'_ Generics<'_>) {
         if_chain! {
             if let WherePredicate::BoundPredicate(ref bound_predicate) = predicate;
             if !in_macro(bound_predicate.span);
-            if let TyKind::Path(ref path) = bound_predicate.bounded_ty.kind;
-            if let QPath::Resolved(_, Path { ref segments, .. }) = path;
+            if let TyKind::Path(QPath::Resolved(_, Path { ref segments, .. })) = bound_predicate.bounded_ty.kind;
             if let Some(segment) = segments.first();
             if let Some(trait_resolutions_direct) = map.get(&segment.ident);
             then {