Skip to content

Commit 9721505

Browse files
committed
Fix panicking Option unwraping in match arm analysis
1 parent fb39efe commit 9721505

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide-assists/src/handlers/convert_match_to_let_else.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fn find_arms(
8787
let mut extracting = None;
8888
let mut diverging = None;
8989
for arm in arms {
90-
if ctx.sema.type_of_expr(&arm.expr().unwrap()).unwrap().original().is_never() {
90+
if ctx.sema.type_of_expr(&arm.expr()?)?.original().is_never() {
9191
diverging = Some(arm);
9292
} else {
9393
extracting = Some(arm);

0 commit comments

Comments
 (0)