Make code slightly more uniform
This commit is contained in:
parent
2fbc08e2ce
commit
44f878d75f
@ -590,7 +590,7 @@ fn is_ident_eq_keyword(found: &TokenKind, expected: &TokenType) -> bool {
|
||||
)
|
||||
} else if expected.is_empty() {
|
||||
(
|
||||
format!("unexpected token: {}", actual),
|
||||
format!("unexpected token: {actual}"),
|
||||
(self.prev_token.span, "unexpected token after this".to_string()),
|
||||
)
|
||||
} else {
|
||||
@ -1497,7 +1497,7 @@ fn postfix_inc_dec_suggest(
|
||||
MultiSugg {
|
||||
msg: format!("use `{}= 1` instead", kind.op.chr()),
|
||||
patches: vec![
|
||||
(pre_span, format!("{{ let {} = ", tmp_var)),
|
||||
(pre_span, format!("{{ let {tmp_var} = ")),
|
||||
(post_span, format!("; {} {}= 1; {} }}", base_src, kind.op.chr(), tmp_var)),
|
||||
],
|
||||
applicability: Applicability::HasPlaceholders,
|
||||
|
Loading…
Reference in New Issue
Block a user