aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir/src/code_model_api.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs
index 43bd2003c..25d710c73 100644
--- a/crates/ra_hir/src/code_model_api.rs
+++ b/crates/ra_hir/src/code_model_api.rs
@@ -124,13 +124,13 @@ impl Struct {
124 self.def_id 124 self.def_id
125 } 125 }
126 126
127 pub fn variant_data(&self, db: &impl HirDatabase) -> Cancelable<Arc<VariantData>> {
128 Ok(db.struct_data(self.def_id)?.variant_data.clone())
129 }
130
131 pub fn name(&self, db: &impl HirDatabase) -> Cancelable<Option<Name>> { 127 pub fn name(&self, db: &impl HirDatabase) -> Cancelable<Option<Name>> {
132 Ok(db.struct_data(self.def_id)?.name.clone()) 128 Ok(db.struct_data(self.def_id)?.name.clone())
133 } 129 }
130
131 pub fn variant_data(&self, db: &impl HirDatabase) -> Cancelable<Arc<VariantData>> {
132 Ok(db.struct_data(self.def_id)?.variant_data.clone())
133 }
134} 134}
135 135
136#[derive(Debug, Clone, PartialEq, Eq, Hash)] 136#[derive(Debug, Clone, PartialEq, Eq, Hash)]