diff options
author | Aleksey Kladov <[email protected]> | 2021-01-30 15:19:21 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-03-16 13:10:49 +0000 |
commit | f5a81ec4683613bd62624811733345d627f2127b (patch) | |
tree | 54490888591ddc005d510695787308b78739ef05 /crates/ide_assists/src/handlers/unwrap_block.rs | |
parent | 62ec04bbd53ba50e21a7b8f23d46958d322640eb (diff) |
Upgrade rowan
Notably, new rowan comes with support for mutable syntax trees.
Diffstat (limited to 'crates/ide_assists/src/handlers/unwrap_block.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/unwrap_block.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_assists/src/handlers/unwrap_block.rs b/crates/ide_assists/src/handlers/unwrap_block.rs index ed6f6177d..440639322 100644 --- a/crates/ide_assists/src/handlers/unwrap_block.rs +++ b/crates/ide_assists/src/handlers/unwrap_block.rs | |||
@@ -30,7 +30,7 @@ pub(crate) fn unwrap_block(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
30 | let assist_label = "Unwrap block"; | 30 | let assist_label = "Unwrap block"; |
31 | 31 | ||
32 | let l_curly_token = ctx.find_token_syntax_at_offset(T!['{'])?; | 32 | let l_curly_token = ctx.find_token_syntax_at_offset(T!['{'])?; |
33 | let mut block = ast::BlockExpr::cast(l_curly_token.parent())?; | 33 | let mut block = ast::BlockExpr::cast(l_curly_token.parent()?)?; |
34 | let target = block.syntax().text_range(); | 34 | let target = block.syntax().text_range(); |
35 | let mut parent = block.syntax().parent()?; | 35 | let mut parent = block.syntax().parent()?; |
36 | if ast::MatchArm::can_cast(parent.kind()) { | 36 | if ast::MatchArm::can_cast(parent.kind()) { |