From e84f93cb5b651696637d87b98653d7e8f9149086 Mon Sep 17 00:00:00 2001 From: Ekaterina Babshukova Date: Thu, 22 Aug 2019 21:31:21 +0300 Subject: refactor fill_match_arms assist --- crates/ra_assists/src/add_missing_impl_members.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_assists/src/add_missing_impl_members.rs') diff --git a/crates/ra_assists/src/add_missing_impl_members.rs b/crates/ra_assists/src/add_missing_impl_members.rs index 31c7d4e80..cbeb7054f 100644 --- a/crates/ra_assists/src/add_missing_impl_members.rs +++ b/crates/ra_assists/src/add_missing_impl_members.rs @@ -1,13 +1,14 @@ +use hir::{db::HirDatabase, HasSource}; +use ra_syntax::{ + ast::{self, AstNode, NameOwner}, + SmolStr, +}; + use crate::{ ast_editor::{AstBuilder, AstEditor}, Assist, AssistCtx, AssistId, }; -use hir::{db::HirDatabase, HasSource}; -use ra_db::FilePosition; -use ra_syntax::ast::{self, AstNode, NameOwner}; -use ra_syntax::SmolStr; - #[derive(PartialEq)] enum AddMissingImplMembersMode { DefaultMethodsOnly, @@ -43,8 +44,7 @@ fn add_missing_impl_members_inner( let trait_def = { let file_id = ctx.frange.file_id; - let position = FilePosition { file_id, offset: impl_node.syntax().text_range().start() }; - let analyzer = hir::SourceAnalyzer::new(ctx.db, position.file_id, impl_node.syntax(), None); + let analyzer = hir::SourceAnalyzer::new(ctx.db, file_id, impl_node.syntax(), None); resolve_target_trait_def(ctx.db, &analyzer, &impl_node)? }; -- cgit v1.2.3