use matches!() macro for simple if let conditions
This commit is contained in:
parent
2c69266c06
commit
40dddd3305
15 changed files with 33 additions and 36 deletions
|
@ -1529,7 +1529,7 @@ impl<'a> TraitDef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
let is_tuple = if let ast::VariantData::Tuple(..) = struct_def { true } else { false };
|
||||
let is_tuple = matches!(struct_def, ast::VariantData::Tuple(..));
|
||||
match (just_spans.is_empty(), named_idents.is_empty()) {
|
||||
(false, false) => cx.span_bug(
|
||||
self.span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue