From 0c470b3339532e063d3cedc517b7952779376d78 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Wed, 3 Jun 2020 15:15:53 -0400 Subject: [PATCH] Bump to 1.46 --- clippy_lints/src/write.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/write.rs b/clippy_lints/src/write.rs index dfa6223f1b9d..37fbc2bad468 100644 --- a/clippy_lints/src/write.rs +++ b/clippy_lints/src/write.rs @@ -279,13 +279,13 @@ impl EarlyLintPass for Write { if let (Some(fmt_str), expr) = self.check_tts(cx, &mac.args.inner_tokens(), true) { if fmt_str.symbol == Symbol::intern("") { let mut applicability = Applicability::MachineApplicable; - let suggestion = expr.map_or_else( - move || { + let suggestion = match expr { + Some(expr) => snippet_with_applicability(cx, expr.span, "v", &mut applicability), + None => { applicability = Applicability::HasPlaceholders; Cow::Borrowed("v") }, - move |expr| snippet_with_applicability(cx, expr.span, "v", &mut applicability), - ); + }; span_lint_and_sugg( cx,