mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Simplify
This commit is contained in:
parent
37ad9cb2a5
commit
894a09b749
3 changed files with 6 additions and 15 deletions
|
@ -70,14 +70,8 @@ pub(crate) fn annotations(
|
|||
hir::ModuleDef::Trait(trait_) => {
|
||||
trait_.source(db).and_then(|node| name_range(&node, file_id))
|
||||
}
|
||||
hir::ModuleDef::Adt(hir::Adt::Struct(strukt)) => {
|
||||
strukt.source(db).and_then(|node| name_range(&node, file_id))
|
||||
}
|
||||
hir::ModuleDef::Adt(hir::Adt::Enum(enum_)) => {
|
||||
enum_.source(db).and_then(|node| name_range(&node, file_id))
|
||||
}
|
||||
hir::ModuleDef::Adt(hir::Adt::Union(union)) => {
|
||||
union.source(db).and_then(|node| name_range(&node, file_id))
|
||||
hir::ModuleDef::Adt(adt) => {
|
||||
adt.source(db).and_then(|node| name_range(&node, file_id))
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue