Remove unintentional changes

This commit is contained in:
Zac Pullar-Strecker 2020-06-30 21:37:42 +12:00
parent dc32f756e0
commit d6f9e8806a
6 changed files with 13 additions and 16 deletions

View file

@ -186,17 +186,18 @@ impl ModuleDef {
module.visibility_of(db, self)
}
pub fn name(&self, db: &dyn HirDatabase) -> Option<Name> {
pub fn name(self, db: &dyn HirDatabase) -> Option<Name> {
match self {
ModuleDef::Module(m) => m.name(db),
ModuleDef::Function(m) => Some(m.name(db)),
ModuleDef::Adt(m) => Some(m.name(db)),
ModuleDef::EnumVariant(m) => Some(m.name(db)),
ModuleDef::Const(m) => m.name(db),
ModuleDef::Static(m) => m.name(db),
ModuleDef::Trait(m) => Some(m.name(db)),
ModuleDef::TypeAlias(m) => Some(m.name(db)),
ModuleDef::BuiltinType(m) => Some(m.as_name()),
ModuleDef::Adt(it) => Some(it.name(db)),
ModuleDef::Trait(it) => Some(it.name(db)),
ModuleDef::Function(it) => Some(it.name(db)),
ModuleDef::EnumVariant(it) => Some(it.name(db)),
ModuleDef::TypeAlias(it) => Some(it.name(db)),
ModuleDef::Module(it) => it.name(db),
ModuleDef::Const(it) => it.name(db),
ModuleDef::Static(it) => it.name(db),
ModuleDef::BuiltinType(it) => Some(it.as_name()),
}
}