Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/add_missing_match_arms.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/add_missing_match_arms.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/ide-assists/src/handlers/add_missing_match_arms.rs b/crates/ide-assists/src/handlers/add_missing_match_arms.rs index 777e40eb44..8600121bef 100644 --- a/crates/ide-assists/src/handlers/add_missing_match_arms.rs +++ b/crates/ide-assists/src/handlers/add_missing_match_arms.rs @@ -3,7 +3,6 @@ use std::iter::{self, Peekable}; use either::Either; use hir::{Adt, Crate, HasAttrs, ImportPathConfig, ModuleDef, Semantics, sym}; use ide_db::RootDatabase; -use ide_db::base_db::salsa::AsDynDatabase; use ide_db::syntax_helpers::suggest_name; use ide_db::{famous_defs::FamousDefs, helpers::mod_path_to_ast}; use itertools::Itertools; @@ -257,12 +256,7 @@ pub(crate) fn add_missing_match_arms(acc: &mut Assists, ctx: &AssistContext<'_>) // Just replace the element that the original range came from let old_place = { // Find the original element - let editioned_file_id = ide_db::base_db::EditionedFileId::new( - ctx.sema.db.as_dyn_database(), - arm_list_range.file_id, - ); - - let file = ctx.sema.parse(editioned_file_id); + let file = ctx.sema.parse(arm_list_range.file_id); let old_place = file.syntax().covering_element(arm_list_range.range); match old_place { @@ -300,7 +294,7 @@ pub(crate) fn add_missing_match_arms(acc: &mut Assists, ctx: &AssistContext<'_>) } editor.add_mappings(make.take()); - builder.add_file_edits(ctx.file_id(), editor); + builder.add_file_edits(ctx.vfs_file_id(), editor); }, ) } |