Skip to content

Commit 1959ef4

Browse files
committed
Avoid an unwrap
1 parent cf96b19 commit 1959ef4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/formality-prove/src/prove/prove_wc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ judgment_fn! {
116116
)
117117

118118
(
119-
(if ct.as_value().is_some())
120-
(prove(decls, env, assumptions, Wcs::all_eq(vec![ct.as_value().unwrap().1], vec![ty])) => c)
119+
(if let Some((_, const_ty)) = ct.as_value())
120+
(prove(decls, env, assumptions, Wcs::all_eq(vec![const_ty], vec![ty])) => c)
121121
----------------------------- ("const has ty")
122122
(prove_wc(decls, env, assumptions, Predicate::ConstHasType(ct, ty)) => c)
123123
)

0 commit comments

Comments
 (0)