aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-08 12:23:56 +0000
committerAleksey Kladov <[email protected]>2019-01-08 12:23:56 +0000
commit71c7936932c7471ce968223c20fd9bb812524c7a (patch)
tree1ff86d6788ff6434afb86c39175229fbb7586413 /crates
parent2d4dc22af8db8f9ebb5f2e95cd25c473494a4b70 (diff)
minor
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)]