Skip to content

Commit cbd0135

Browse files
committed
Update trait_bounds.rs
1 parent b9788fe commit cbd0135

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clippy_lints/src/trait_bounds.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,13 @@ impl<'tcx> LateLintPass<'tcx> for TraitBounds {
206206
}
207207
}
208208

209-
let fixed_trait_snippet = fixed_traits
210-
.iter()
211-
.filter_map(|b| snippet_opt(cx, b.span))
212-
.collect::<Vec<_>>()
213-
.join(" + ");
214-
215209
if bounds.len() != fixed_traits.len() {
210+
let fixed_trait_snippet = fixed_traits
211+
.iter()
212+
.filter_map(|b| snippet_opt(cx, b.span))
213+
.collect::<Vec<_>>()
214+
.join(" + ");
215+
216216
span_lint_and_sugg(
217217
cx,
218218
TRAIT_DUPLICATION_IN_BOUNDS,

0 commit comments

Comments
 (0)