Negate results of matches!
This commit is contained in:
parent
2af642da28
commit
ab155b14a2
@ -443,7 +443,7 @@ fn check_tts<'a>(&self, cx: &EarlyContext<'a>, tts: TokenStream, is_write: bool)
|
||||
return (Some(fmtstr), None);
|
||||
};
|
||||
match &token_expr.kind {
|
||||
ExprKind::Lit(lit) if matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..)) => {
|
||||
ExprKind::Lit(lit) if !matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..)) => {
|
||||
let mut all_simple = true;
|
||||
let mut seen = false;
|
||||
for arg in &args {
|
||||
@ -465,7 +465,7 @@ fn check_tts<'a>(&self, cx: &EarlyContext<'a>, tts: TokenStream, is_write: bool)
|
||||
ExprKind::Assign(lhs, rhs, _) => {
|
||||
if_chain! {
|
||||
if let ExprKind::Lit(ref lit) = rhs.kind;
|
||||
if matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..));
|
||||
if !matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..));
|
||||
if let ExprKind::Path(_, p) = &lhs.kind;
|
||||
then {
|
||||
let mut all_simple = true;
|
||||
|
Loading…
Reference in New Issue
Block a user