aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorLaurenČ›iu Nicola <[email protected]>2020-04-06 15:21:33 +0100
committerLaurenČ›iu Nicola <[email protected]>2020-04-06 15:21:33 +0100
commit52fd2c8e4858c548195edceb83c02437d2d28ee5 (patch)
tree344f7bd6402f3bd846b437c1a8cfc6165881492d /crates/ra_hir
parent2603a9e628d304c8cb8fd08979e2f9c9afeac69e (diff)
Fix unnecessary braces warnings
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/semantics/source_to_def.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs
index 8843f2835..66724919b 100644
--- a/crates/ra_hir/src/semantics/source_to_def.rs
+++ b/crates/ra_hir/src/semantics/source_to_def.rs
@@ -208,12 +208,12 @@ impl SourceToDefCtx<'_, '_> {
208 for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) { 208 for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) {
209 let res: GenericDefId = match_ast! { 209 let res: GenericDefId = match_ast! {
210 match (container.value) { 210 match (container.value) {
211 ast::FnDef(it) => { self.fn_to_def(container.with_value(it))?.into() }, 211 ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(),
212 ast::StructDef(it) => { self.struct_to_def(container.with_value(it))?.into() }, 212 ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(),
213 ast::EnumDef(it) => { self.enum_to_def(container.with_value(it))?.into() }, 213 ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(),
214 ast::TraitDef(it) => { self.trait_to_def(container.with_value(it))?.into() }, 214 ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(),
215 ast::TypeAliasDef(it) => { self.type_alias_to_def(container.with_value(it))?.into() }, 215 ast::TypeAliasDef(it) => self.type_alias_to_def(container.with_value(it))?.into(),
216 ast::ImplDef(it) => { self.impl_to_def(container.with_value(it))?.into() }, 216 ast::ImplDef(it) => self.impl_to_def(container.with_value(it))?.into(),
217 _ => continue, 217 _ => continue,
218 } 218 }
219 }; 219 };
@@ -226,9 +226,9 @@ impl SourceToDefCtx<'_, '_> {
226 for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) { 226 for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) {
227 let res: DefWithBodyId = match_ast! { 227 let res: DefWithBodyId = match_ast! {
228 match (container.value) { 228 match (container.value) {
229 ast::ConstDef(it) => { self.const_to_def(container.with_value(it))?.into() }, 229 ast::ConstDef(it) => self.const_to_def(container.with_value(it))?.into(),
230 ast::StaticDef(it) => { self.static_to_def(container.with_value(it))?.into() }, 230 ast::StaticDef(it) => self.static_to_def(container.with_value(it))?.into(),
231 ast::FnDef(it) => { self.fn_to_def(container.with_value(it))?.into() }, 231 ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(),
232 _ => continue, 232 _ => continue,
233 } 233 }
234 }; 234 };