We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b40876 commit 6d5f392Copy full SHA for 6d5f392
crates/ra_assists/src/handlers/unwrap_block.rs
@@ -76,12 +76,11 @@ pub(crate) fn unwrap_block(ctx: AssistCtx) -> Option<Assist> {
76
})
77
}
78
79
-fn extract_expr(cursor_range: TextRange, block_expr: BlockExpr) -> Option<Expr> {
80
- let block = block_expr.block()?;
+fn extract_expr(cursor_range: TextRange, block: BlockExpr) -> Option<Expr> {
81
let cursor_in_range = block.l_curly_token()?.text_range().contains_range(cursor_range);
82
83
if cursor_in_range {
84
- Some(unwrap_trivial_block(block_expr))
+ Some(unwrap_trivial_block(block))
85
} else {
86
None
87
0 commit comments