]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/ptr.rs
Rollup merge of #102604 - anirudh24seven:anirudh_improve_bootrap_readme_readability...
[rust.git] / src / tools / clippy / clippy_lints / src / ptr.rs
index 41d1baba64f851ffa6409bef6e1c6f3f62575ca4..d296a150b46d085cec600152a3c2a05abac8af49 100644 (file)
@@ -463,7 +463,7 @@ fn check_fn_args<'cx, 'tcx: 'cx>(
                                     diag.span_suggestion(
                                         hir_ty.span,
                                         "change this to",
-                                        format!("&{}{}", mutability.prefix_str(), ty_name),
+                                        format!("&{}{ty_name}", mutability.prefix_str()),
                                         Applicability::Unspecified,
                                     );
                                 }
@@ -669,7 +669,7 @@ fn visit_expr(&mut self, e: &'tcx Expr<'_>) {
 }
 
 fn get_rptr_lm<'tcx>(ty: &'tcx hir::Ty<'tcx>) -> Option<(&'tcx Lifetime, Mutability, Span)> {
-    if let TyKind::Rptr(ref lt, ref m) = ty.kind {
+    if let TyKind::Rptr(lt, ref m) = ty.kind {
         Some((lt, m.mutbl, ty.span))
     } else {
         None