This commit is contained in:
Aleksey Kladov 2019-01-08 15:23:56 +03:00
parent 2d4dc22af8
commit 71c7936932

View file

@ -124,13 +124,13 @@ impl Struct {
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>> {
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)]