summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/clippy_lints/src/methods/get_unwrap.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/clippy_lints/src/methods/get_unwrap.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/tools/clippy/clippy_lints/src/methods/get_unwrap.rs b/src/tools/clippy/clippy_lints/src/methods/get_unwrap.rs
index 18e08d6ee..ffc3a4d78 100644
--- a/src/tools/clippy/clippy_lints/src/methods/get_unwrap.rs
+++ b/src/tools/clippy/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,
);