From 12e3b4c70b5ef23b2fdfc197296d483680e125f9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 8 Feb 2019 14:49:43 +0300 Subject: reformat the world --- crates/ra_assists/src/assist_ctx.rs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'crates/ra_assists/src/assist_ctx.rs') diff --git a/crates/ra_assists/src/assist_ctx.rs b/crates/ra_assists/src/assist_ctx.rs index 6d09bde52..0bf640241 100644 --- a/crates/ra_assists/src/assist_ctx.rs +++ b/crates/ra_assists/src/assist_ctx.rs @@ -69,12 +69,7 @@ impl<'a, DB: HirDatabase> AssistCtx<'a, DB> { F: FnOnce(AssistCtx) -> T, { let source_file = &db.parse(frange.file_id); - let ctx = AssistCtx { - db, - frange, - source_file, - should_compute_edit, - }; + let ctx = AssistCtx { db, frange, source_file, should_compute_edit }; f(ctx) } @@ -83,9 +78,7 @@ impl<'a, DB: HirDatabase> AssistCtx<'a, DB> { label: impl Into, f: impl FnOnce(&mut AssistBuilder), ) -> Option { - let label = AssistLabel { - label: label.into(), - }; + let label = AssistLabel { label: label.into() }; if !self.should_compute_edit { return Some(Assist::Unresolved(label)); } @@ -146,9 +139,6 @@ impl AssistBuilder { } fn build(self) -> AssistAction { - AssistAction { - edit: self.edit.finish(), - cursor_position: self.cursor_position, - } + AssistAction { edit: self.edit.finish(), cursor_position: self.cursor_position } } } -- cgit v1.2.3