mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Use Id for variats
This commit is contained in:
parent
17680f6060
commit
9fa46ff5c6
7 changed files with 60 additions and 52 deletions
|
@ -534,14 +534,6 @@ impl VariantDef {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn field(self, db: &impl HirDatabase, name: &Name) -> Option<StructField> {
|
||||
match self {
|
||||
VariantDef::Struct(it) => it.field(db, name),
|
||||
VariantDef::Union(it) => it.field(db, name),
|
||||
VariantDef::EnumVariant(it) => it.field(db, name),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn module(self, db: &impl HirDatabase) -> Module {
|
||||
match self {
|
||||
VariantDef::Struct(it) => it.module(db),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue