From 52fd2c8e4858c548195edceb83c02437d2d28ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 6 Apr 2020 17:21:33 +0300 Subject: Fix unnecessary braces warnings --- crates/ra_hir/src/semantics/source_to_def.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'crates/ra_hir/src/semantics') 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<'_, '_> { for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) { let res: GenericDefId = match_ast! { match (container.value) { - ast::FnDef(it) => { self.fn_to_def(container.with_value(it))?.into() }, - ast::StructDef(it) => { self.struct_to_def(container.with_value(it))?.into() }, - ast::EnumDef(it) => { self.enum_to_def(container.with_value(it))?.into() }, - ast::TraitDef(it) => { self.trait_to_def(container.with_value(it))?.into() }, - ast::TypeAliasDef(it) => { self.type_alias_to_def(container.with_value(it))?.into() }, - ast::ImplDef(it) => { self.impl_to_def(container.with_value(it))?.into() }, + ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(), + ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(), + ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(), + ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(), + ast::TypeAliasDef(it) => self.type_alias_to_def(container.with_value(it))?.into(), + ast::ImplDef(it) => self.impl_to_def(container.with_value(it))?.into(), _ => continue, } }; @@ -226,9 +226,9 @@ impl SourceToDefCtx<'_, '_> { for container in src.cloned().ancestors_with_macros(self.db.upcast()).skip(1) { let res: DefWithBodyId = match_ast! { match (container.value) { - ast::ConstDef(it) => { self.const_to_def(container.with_value(it))?.into() }, - ast::StaticDef(it) => { self.static_to_def(container.with_value(it))?.into() }, - ast::FnDef(it) => { self.fn_to_def(container.with_value(it))?.into() }, + ast::ConstDef(it) => self.const_to_def(container.with_value(it))?.into(), + ast::StaticDef(it) => self.static_to_def(container.with_value(it))?.into(), + ast::FnDef(it) => self.fn_to_def(container.with_value(it))?.into(), _ => continue, } }; -- cgit v1.2.3