From 5ac6804bb3a07b959e8c2c3534255a8d6bb4948c Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:48:15 +0530 Subject: cargo fmt --- crates/hir_def/src/lib.rs | 51 ++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 27 deletions(-) (limited to 'crates/hir_def/src') diff --git a/crates/hir_def/src/lib.rs b/crates/hir_def/src/lib.rs index 3e7d496d5..303083c6d 100644 --- a/crates/hir_def/src/lib.rs +++ b/crates/hir_def/src/lib.rs @@ -731,12 +731,11 @@ fn macro_call_as_call_id( ) .map(MacroCallId::from) } else { - Ok(def - .as_lazy_macro( - db.upcast(), - krate, - MacroCallKind::FnLike { ast_id: call.ast_id, fragment }, - )) + Ok(def.as_lazy_macro( + db.upcast(), + krate, + MacroCallKind::FnLike { ast_id: call.ast_id, fragment }, + )) }; Ok(res) } @@ -755,16 +754,15 @@ fn derive_macro_as_call_id( .segments() .last() .ok_or_else(|| UnresolvedMacro { path: item_attr.path.clone() })?; - let res = def - .as_lazy_macro( - db.upcast(), - krate, - MacroCallKind::Derive { - ast_id: item_attr.ast_id, - derive_name: last_segment.to_string(), - derive_attr_index: derive_attr.ast_index, - }, - ); + let res = def.as_lazy_macro( + db.upcast(), + krate, + MacroCallKind::Derive { + ast_id: item_attr.ast_id, + derive_name: last_segment.to_string(), + derive_attr_index: derive_attr.ast_index, + }, + ); Ok(res) } @@ -792,16 +790,15 @@ fn attr_macro_as_call_id( // The parentheses are always disposed here. arg.delimiter = None; - let res = def - .as_lazy_macro( - db.upcast(), - krate, - MacroCallKind::Attr { - ast_id: item_attr.ast_id, - attr_name: last_segment.to_string(), - attr_args: arg, - invoc_attr_index: macro_attr.id.ast_index, - }, - ); + let res = def.as_lazy_macro( + db.upcast(), + krate, + MacroCallKind::Attr { + ast_id: item_attr.ast_id, + attr_name: last_segment.to_string(), + attr_args: arg, + invoc_attr_index: macro_attr.id.ast_index, + }, + ); Ok(res) } -- cgit v1.2.3