Skip to content

Commit

Permalink
Bump to 1.46
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Jun 3, 2020
1 parent 9fd8e10 commit 0c470b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clippy_lints/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0c470b3

Please sign in to comment.