aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists/flip_trait_bound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/assists/flip_trait_bound.rs')
-rw-r--r--crates/ra_assists/src/assists/flip_trait_bound.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assists/flip_trait_bound.rs b/crates/ra_assists/src/assists/flip_trait_bound.rs
index 50b3fa492..f56769624 100644
--- a/crates/ra_assists/src/assists/flip_trait_bound.rs
+++ b/crates/ra_assists/src/assists/flip_trait_bound.rs
@@ -1,4 +1,3 @@
1use hir::db::HirDatabase;
2use ra_syntax::{ 1use ra_syntax::{
3 algo::non_trivia_sibling, 2 algo::non_trivia_sibling,
4 ast::{self, AstNode}, 3 ast::{self, AstNode},
@@ -18,7 +17,7 @@ use crate::{Assist, AssistCtx, AssistId};
18// ``` 17// ```
19// fn foo<T: Copy + Clone>() { } 18// fn foo<T: Copy + Clone>() { }
20// ``` 19// ```
21pub(crate) fn flip_trait_bound(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { 20pub(crate) fn flip_trait_bound(ctx: AssistCtx) -> Option<Assist> {
22 // We want to replicate the behavior of `flip_binexpr` by only suggesting 21 // We want to replicate the behavior of `flip_binexpr` by only suggesting
23 // the assist when the cursor is on a `+` 22 // the assist when the cursor is on a `+`
24 let plus = ctx.find_token_at_offset(T![+])?; 23 let plus = ctx.find_token_at_offset(T![+])?;