mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 22:54:00 +00:00
Fix panicking Option unwraping in match arm analysis
This commit is contained in:
parent
fb39efe26c
commit
9721505bf1
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ fn find_arms(
|
|||
let mut extracting = None;
|
||||
let mut diverging = None;
|
||||
for arm in arms {
|
||||
if ctx.sema.type_of_expr(&arm.expr().unwrap()).unwrap().original().is_never() {
|
||||
if ctx.sema.type_of_expr(&arm.expr()?)?.original().is_never() {
|
||||
diverging = Some(arm);
|
||||
} else {
|
||||
extracting = Some(arm);
|
||||
|
|
Loading…
Reference in a new issue