about summary refs log tree commit diff
path: root/clippy_lints/src/methods/get_unwrap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'clippy_lints/src/methods/get_unwrap.rs')
-rw-r--r--clippy_lints/src/methods/get_unwrap.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/clippy_lints/src/methods/get_unwrap.rs b/clippy_lints/src/methods/get_unwrap.rs
index 18e08d6ee23..ffc3a4d780e 100644
--- a/clippy_lints/src/methods/get_unwrap.rs
+++ b/clippy_lints/src/methods/get_unwrap.rs
@@ -71,16 +71,11 @@ pub(super) fn check<'tcx>(
         cx,
         GET_UNWRAP,
         span,
-        &format!(
-            "called `.get{0}().unwrap()` on a {1}. Using `[]` is more clear and more concise",
-            mut_str, caller_type
-        ),
+        &format!("called `.get{mut_str}().unwrap()` on a {caller_type}. Using `[]` is more clear and more concise"),
         "try this",
         format!(
-            "{}{}[{}]",
-            borrow_str,
-            snippet_with_applicability(cx, recv.span, "..", &mut applicability),
-            get_args_str
+            "{borrow_str}{}[{get_args_str}]",
+            snippet_with_applicability(cx, recv.span, "..", &mut applicability)
         ),
         applicability,
     );