diff options
Diffstat (limited to 'clippy_lints/src/casts/ptr_as_ptr.rs')
| -rw-r--r-- | clippy_lints/src/casts/ptr_as_ptr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/casts/ptr_as_ptr.rs b/clippy_lints/src/casts/ptr_as_ptr.rs index 46d45d09661..c2b9253ec35 100644 --- a/clippy_lints/src/casts/ptr_as_ptr.rs +++ b/clippy_lints/src/casts/ptr_as_ptr.rs @@ -33,7 +33,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, msrv: Option<RustcVer let turbofish = match &cast_to_hir_ty.kind { TyKind::Infer => Cow::Borrowed(""), TyKind::Ptr(mut_ty) if matches!(mut_ty.ty.kind, TyKind::Infer) => Cow::Borrowed(""), - _ => Cow::Owned(format!("::<{}>", to_pointee_ty)), + _ => Cow::Owned(format!("::<{to_pointee_ty}>")), }; span_lint_and_sugg( cx, @@ -41,7 +41,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, msrv: Option<RustcVer expr.span, "`as` casting between raw pointers without changing its mutability", "try `pointer::cast`, a safer alternative", - format!("{}.cast{}()", cast_expr_sugg.maybe_par(), turbofish), + format!("{}.cast{turbofish}()", cast_expr_sugg.maybe_par()), applicability, ); } |
