aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/flip_comma.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/flip_comma.rs')
-rw-r--r--crates/ra_assists/src/flip_comma.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_assists/src/flip_comma.rs b/crates/ra_assists/src/flip_comma.rs
index 13016ae06..34489329c 100644
--- a/crates/ra_assists/src/flip_comma.rs
+++ b/crates/ra_assists/src/flip_comma.rs
@@ -8,9 +8,9 @@ pub(crate) fn flip_comma(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist>
8 let prev = non_trivia_sibling(comma.clone().into(), Direction::Prev)?; 8 let prev = non_trivia_sibling(comma.clone().into(), Direction::Prev)?;
9 let next = non_trivia_sibling(comma.clone().into(), Direction::Next)?; 9 let next = non_trivia_sibling(comma.clone().into(), Direction::Next)?;
10 ctx.add_action(AssistId("flip_comma"), "flip comma", |edit| { 10 ctx.add_action(AssistId("flip_comma"), "flip comma", |edit| {
11 edit.target(comma.range()); 11 edit.target(comma.text_range());
12 edit.replace(prev.range(), next.to_string()); 12 edit.replace(prev.text_range(), next.to_string());
13 edit.replace(next.range(), prev.to_string()); 13 edit.replace(next.text_range(), prev.to_string());
14 }); 14 });
15 15
16 ctx.build() 16 ctx.build()