From f68ee79864fb51232fb186fda6bf218be50c7e4a Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Mon, 5 Jun 2023 14:53:22 -0500 Subject: [PATCH] Update trait_bounds.rs --- clippy_lints/src/trait_bounds.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/trait_bounds.rs b/clippy_lints/src/trait_bounds.rs index 90c6429ff380..2e6108d6b242 100644 --- a/clippy_lints/src/trait_bounds.rs +++ b/clippy_lints/src/trait_bounds.rs @@ -262,7 +262,7 @@ impl TraitBounds { ); let bounded_ty = snippet(cx, p.bounded_ty.span, "_"); if let TyKind::Path(qpath) = p.bounded_ty.kind; - if format!("{}:", rustc_hir_pretty::qpath_to_string(&qpath)) == format!("{}:", bounded_ty); + if format!("{}:", rustc_hir_pretty::qpath_to_string(&qpath)) == format!("{bounded_ty}:"); then { let trait_bounds = v @@ -272,7 +272,7 @@ impl TraitBounds { .filter_map(get_trait_info_from_bound) .map(|(_, _, span)| snippet_with_applicability(cx, span, "..", &mut applicability)) .join(" + "); - let hint_string = format!("consider combining the bounds: `{}: {trait_bounds}`", bounded_ty); + let hint_string = format!("consider combining the bounds: `{bounded_ty}: {trait_bounds}`"); span_lint_and_help( cx, TYPE_REPETITION_IN_BOUNDS,