Skip to content

Commit 0c470b3

Browse files
Bump to 1.46
1 parent 9fd8e10 commit 0c470b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clippy_lints/src/write.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,13 @@ impl EarlyLintPass for Write {
279279
if let (Some(fmt_str), expr) = self.check_tts(cx, &mac.args.inner_tokens(), true) {
280280
if fmt_str.symbol == Symbol::intern("") {
281281
let mut applicability = Applicability::MachineApplicable;
282-
let suggestion = expr.map_or_else(
283-
move || {
282+
let suggestion = match expr {
283+
Some(expr) => snippet_with_applicability(cx, expr.span, "v", &mut applicability),
284+
None => {
284285
applicability = Applicability::HasPlaceholders;
285286
Cow::Borrowed("v")
286287
},
287-
move |expr| snippet_with_applicability(cx, expr.span, "v", &mut applicability),
288-
);
288+
};
289289

290290
span_lint_and_sugg(
291291
cx,

0 commit comments

Comments
 (0)