diff options
author | Aleksey Kladov <[email protected]> | 2020-05-06 11:51:28 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-06 11:51:28 +0100 |
commit | 233f01c9ba555e5d06f336cb0ff64e7a83e4a23a (patch) | |
tree | 7922dca3f7c4133e2616257be537428337e479d6 /crates/ra_assists/src/handlers/flip_binexpr.rs | |
parent | ede8906844e206f252810d58533538cf1fb326d4 (diff) |
Move target to AssistLabel
Target is used for assists sorting, so we need it before we compute
the action.
Diffstat (limited to 'crates/ra_assists/src/handlers/flip_binexpr.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/flip_binexpr.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/flip_binexpr.rs b/crates/ra_assists/src/handlers/flip_binexpr.rs index 41db963dc..cb7264d7b 100644 --- a/crates/ra_assists/src/handlers/flip_binexpr.rs +++ b/crates/ra_assists/src/handlers/flip_binexpr.rs | |||
@@ -33,8 +33,7 @@ pub(crate) fn flip_binexpr(ctx: AssistCtx) -> Option<Assist> { | |||
33 | return None; | 33 | return None; |
34 | } | 34 | } |
35 | 35 | ||
36 | ctx.add_assist(AssistId("flip_binexpr"), "Flip binary expression", |edit| { | 36 | ctx.add_assist(AssistId("flip_binexpr"), "Flip binary expression", op_range, |edit| { |
37 | edit.target(op_range); | ||
38 | if let FlipAction::FlipAndReplaceOp(new_op) = action { | 37 | if let FlipAction::FlipAndReplaceOp(new_op) = action { |
39 | edit.replace(op_range, new_op); | 38 | edit.replace(op_range, new_op); |
40 | } | 39 | } |