diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-03 13:44:09 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-03 13:44:09 +0100 |
commit | f51b0cfdd6c23dd57a0a11154179730171c0425d (patch) | |
tree | f856e6b751b23a20d68e9df5350ec39d5e8ee85b /crates/ra_assists/src/handlers/unwrap_block.rs | |
parent | ef6a6d75d5dba2825e6b90e67e0b147a5f7158e1 (diff) | |
parent | 4c9347ecc3356748c52847a29d5e53a65778dc13 (diff) |
Merge #5116
5116: Categorize assists r=matklad a=kjeremy
Categorize assists so that editors can use them. Follows the LSP spec pretty close (and some things may need adjustments) but this populates the Refactor menu in vscode and pushes quickfixes through again.
This is a prerequisite to filtering out assists that the client doesn't care about.
Fixes #4147
Co-authored-by: Jeremy Kolb <[email protected]>
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/handlers/unwrap_block.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/unwrap_block.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/unwrap_block.rs b/crates/ra_assists/src/handlers/unwrap_block.rs index 1fb13f481..8b38695a9 100644 --- a/crates/ra_assists/src/handlers/unwrap_block.rs +++ b/crates/ra_assists/src/handlers/unwrap_block.rs | |||
@@ -7,7 +7,7 @@ use ra_syntax::{ | |||
7 | AstNode, TextRange, T, | 7 | AstNode, TextRange, T, |
8 | }; | 8 | }; |
9 | 9 | ||
10 | use crate::{AssistContext, AssistId, Assists}; | 10 | use crate::{AssistContext, AssistId, AssistKind, Assists}; |
11 | 11 | ||
12 | // Assist: unwrap_block | 12 | // Assist: unwrap_block |
13 | // | 13 | // |
@@ -27,7 +27,7 @@ use crate::{AssistContext, AssistId, Assists}; | |||
27 | // } | 27 | // } |
28 | // ``` | 28 | // ``` |
29 | pub(crate) fn unwrap_block(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | 29 | pub(crate) fn unwrap_block(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { |
30 | let assist_id = AssistId("unwrap_block"); | 30 | let assist_id = AssistId("unwrap_block", AssistKind::RefactorRewrite); |
31 | let assist_label = "Unwrap block"; | 31 | let assist_label = "Unwrap block"; |
32 | 32 | ||
33 | let l_curly_token = ctx.find_token_at_offset(T!['{'])?; | 33 | let l_curly_token = ctx.find_token_at_offset(T!['{'])?; |