aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists/flip_comma.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-06 15:58:57 +0000
committerAleksey Kladov <[email protected]>2020-02-06 16:12:02 +0000
commitcf812c12d1ac7944d1c18877ee93bea02d91e99f (patch)
tree71e13733941e2c0520cfe5d16fb00f428f3233da /crates/ra_assists/src/assists/flip_comma.rs
parentf8965ffafd5cf467b3f0482ca962ba2bfd090161 (diff)
Assists are not generic
Diffstat (limited to 'crates/ra_assists/src/assists/flip_comma.rs')
-rw-r--r--crates/ra_assists/src/assists/flip_comma.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assists/flip_comma.rs b/crates/ra_assists/src/assists/flip_comma.rs
index dd0c405ed..1dacf29f8 100644
--- a/crates/ra_assists/src/assists/flip_comma.rs
+++ b/crates/ra_assists/src/assists/flip_comma.rs
@@ -1,4 +1,3 @@
1use hir::db::HirDatabase;
2use ra_syntax::{algo::non_trivia_sibling, Direction, T}; 1use ra_syntax::{algo::non_trivia_sibling, Direction, T};
3 2
4use crate::{Assist, AssistCtx, AssistId}; 3use crate::{Assist, AssistCtx, AssistId};
@@ -18,7 +17,7 @@ use crate::{Assist, AssistCtx, AssistId};
18// ((3, 4), (1, 2)); 17// ((3, 4), (1, 2));
19// } 18// }
20// ``` 19// ```
21pub(crate) fn flip_comma(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { 20pub(crate) fn flip_comma(ctx: AssistCtx) -> Option<Assist> {
22 let comma = ctx.find_token_at_offset(T![,])?; 21 let comma = ctx.find_token_at_offset(T![,])?;
23 let prev = non_trivia_sibling(comma.clone().into(), Direction::Prev)?; 22 let prev = non_trivia_sibling(comma.clone().into(), Direction::Prev)?;
24 let next = non_trivia_sibling(comma.clone().into(), Direction::Next)?; 23 let next = non_trivia_sibling(comma.clone().into(), Direction::Next)?;