File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1737,7 +1737,7 @@ impl<'a> Typechecker<'a> {
17371737 }
17381738
17391739 if simple_types. len ( ) == 1 {
1740- * simple_types. iter ( ) . next ( ) . unwrap ( )
1740+ * simple_types. iter ( ) . next ( ) . expect ( "should have exactly 1 element" )
17411741 } else {
17421742 self . oneof_types . push ( simple_types) ;
17431743 self . push_type ( Type :: OneOf ( OneOfId ( self . oneof_types . len ( ) - 1 ) ) )
@@ -1852,7 +1852,7 @@ impl<'a> Typechecker<'a> {
18521852 let single_res = if res. is_empty ( ) {
18531853 TOP_TYPE
18541854 } else if res. len ( ) == 1 {
1855- * res. iter ( ) . next ( ) . unwrap ( )
1855+ * res. iter ( ) . next ( ) . expect ( "should have exactly 1 element" )
18561856 } else {
18571857 self . allof_types . push ( res) ;
18581858 self . push_type ( Type :: AllOf ( AllOfId ( self . allof_types . len ( ) - 1 ) ) )
You can’t perform that action at this time.
0 commit comments