mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
minor
This commit is contained in:
parent
2d4dc22af8
commit
71c7936932
1 changed files with 4 additions and 4 deletions
|
@ -124,13 +124,13 @@ impl Struct {
|
||||||
self.def_id
|
self.def_id
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn variant_data(&self, db: &impl HirDatabase) -> Cancelable<Arc<VariantData>> {
|
|
||||||
Ok(db.struct_data(self.def_id)?.variant_data.clone())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn name(&self, db: &impl HirDatabase) -> Cancelable<Option<Name>> {
|
pub fn name(&self, db: &impl HirDatabase) -> Cancelable<Option<Name>> {
|
||||||
Ok(db.struct_data(self.def_id)?.name.clone())
|
Ok(db.struct_data(self.def_id)?.name.clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn variant_data(&self, db: &impl HirDatabase) -> Cancelable<Arc<VariantData>> {
|
||||||
|
Ok(db.struct_data(self.def_id)?.variant_data.clone())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue