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.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_assists/src/flip_comma.rs b/crates/ra_assists/src/flip_comma.rs
index 08644d720..0d4a789fc 100644
--- a/crates/ra_assists/src/flip_comma.rs
+++ b/crates/ra_assists/src/flip_comma.rs
@@ -2,9 +2,10 @@ use hir::db::HirDatabase;
2use ra_syntax::{ 2use ra_syntax::{
3 Direction, 3 Direction,
4 SyntaxKind::COMMA, 4 SyntaxKind::COMMA,
5 algo::non_trivia_sibling,
5}; 6};
6 7
7use crate::{AssistCtx, Assist, non_trivia_sibling}; 8use crate::{AssistCtx, Assist};
8 9
9pub(crate) fn flip_comma(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { 10pub(crate) fn flip_comma(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
10 let comma = ctx.leaf_at_offset().find(|leaf| leaf.kind() == COMMA)?; 11 let comma = ctx.leaf_at_offset().find(|leaf| leaf.kind() == COMMA)?;