aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_db/src/helpers')
-rw-r--r--crates/ide_db/src/helpers/insert_use.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_db/src/helpers/insert_use.rs b/crates/ide_db/src/helpers/insert_use.rs
index 37acf95f0..20c195f82 100644
--- a/crates/ide_db/src/helpers/insert_use.rs
+++ b/crates/ide_db/src/helpers/insert_use.rs
@@ -213,7 +213,7 @@ pub fn try_merge_imports(
213 let lhs_tree = lhs.use_tree()?; 213 let lhs_tree = lhs.use_tree()?;
214 let rhs_tree = rhs.use_tree()?; 214 let rhs_tree = rhs.use_tree()?;
215 let merged = try_merge_trees(&lhs_tree, &rhs_tree, merge_behavior)?; 215 let merged = try_merge_trees(&lhs_tree, &rhs_tree, merge_behavior)?;
216 Some(lhs.with_use_tree(merged)) 216 Some(lhs.with_use_tree(merged).clone_for_update())
217} 217}
218 218
219pub fn try_merge_trees( 219pub fn try_merge_trees(
@@ -234,7 +234,7 @@ pub fn try_merge_trees(
234 } else { 234 } else {
235 (lhs.split_prefix(&lhs_prefix), rhs.split_prefix(&rhs_prefix)) 235 (lhs.split_prefix(&lhs_prefix), rhs.split_prefix(&rhs_prefix))
236 }; 236 };
237 recursive_merge(&lhs, &rhs, merge) 237 recursive_merge(&lhs, &rhs, merge).map(|it| it.clone_for_update())
238} 238}
239 239
240/// Recursively "zips" together lhs and rhs. 240/// Recursively "zips" together lhs and rhs.