more clippy fixes:
clippy::match_like_matches_macro clippy::to_string_in_format_args clippy::single_char_add_str clippy::filter_map_identity clippy::clone_on_copy clippy::useless_format clippy::unused_unit
This commit is contained in:
@@ -1812,14 +1812,12 @@ impl Macro {
|
||||
|
||||
pub fn is_builtin_derive(&self, db: &dyn HirDatabase) -> bool {
|
||||
match self.id {
|
||||
MacroId::Macro2Id(it) => match it.lookup(db.upcast()).expander {
|
||||
MacroExpander::BuiltInDerive(_) => true,
|
||||
_ => false,
|
||||
},
|
||||
MacroId::MacroRulesId(it) => match it.lookup(db.upcast()).expander {
|
||||
MacroExpander::BuiltInDerive(_) => true,
|
||||
_ => false,
|
||||
},
|
||||
MacroId::Macro2Id(it) => {
|
||||
matches!(it.lookup(db.upcast()).expander, MacroExpander::BuiltInDerive(_))
|
||||
}
|
||||
MacroId::MacroRulesId(it) => {
|
||||
matches!(it.lookup(db.upcast()).expander, MacroExpander::BuiltInDerive(_))
|
||||
}
|
||||
MacroId::ProcMacroId(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user