diff options
author | Aleksey Kladov <[email protected]> | 2020-02-06 15:58:57 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-02-06 16:12:02 +0000 |
commit | cf812c12d1ac7944d1c18877ee93bea02d91e99f (patch) | |
tree | 71e13733941e2c0520cfe5d16fb00f428f3233da /crates/ra_assists/src/assists/flip_comma.rs | |
parent | f8965ffafd5cf467b3f0482ca962ba2bfd090161 (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.rs | 3 |
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 @@ | |||
1 | use hir::db::HirDatabase; | ||
2 | use ra_syntax::{algo::non_trivia_sibling, Direction, T}; | 1 | use ra_syntax::{algo::non_trivia_sibling, Direction, T}; |
3 | 2 | ||
4 | use crate::{Assist, AssistCtx, AssistId}; | 3 | use 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 | // ``` |
21 | pub(crate) fn flip_comma(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | 20 | pub(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)?; |