Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f68ee79

Browse files
committed
Update trait_bounds.rs
1 parent 0250c51 commit f68ee79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/trait_bounds.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl TraitBounds {
262262
);
263263
let bounded_ty = snippet(cx, p.bounded_ty.span, "_");
264264
if let TyKind::Path(qpath) = p.bounded_ty.kind;
265-
if format!("{}:", rustc_hir_pretty::qpath_to_string(&qpath)) == format!("{}:", bounded_ty);
265+
if format!("{}:", rustc_hir_pretty::qpath_to_string(&qpath)) == format!("{bounded_ty}:");
266266

267267
then {
268268
let trait_bounds = v
@@ -272,7 +272,7 @@ impl TraitBounds {
272272
.filter_map(get_trait_info_from_bound)
273273
.map(|(_, _, span)| snippet_with_applicability(cx, span, "..", &mut applicability))
274274
.join(" + ");
275-
let hint_string = format!("consider combining the bounds: `{}: {trait_bounds}`", bounded_ty);
275+
let hint_string = format!("consider combining the bounds: `{bounded_ty}: {trait_bounds}`");
276276
span_lint_and_help(
277277
cx,
278278
TYPE_REPETITION_IN_BOUNDS,

0 commit comments

Comments
 (0)