@@ -997,7 +997,7 @@ impl Program {
997997 . connection
998998 . view_transaction_states
999999 . get ( view_name)
1000- . unwrap ( )
1000+ . expect ( "view should have transaction state" )
10011001 . get_table_deltas ( ) ;
10021002
10031003 let schema = self . connection . schema . read ( ) ;
@@ -1067,7 +1067,7 @@ impl Program {
10671067 let Some ( tx_id) = conn. get_mv_tx_id ( ) else {
10681068 return Ok ( IOResult :: Done ( ( ) ) ) ;
10691069 } ;
1070- let state_machine = mv_store. commit_tx ( tx_id, & conn) . unwrap ( ) ;
1070+ let state_machine = mv_store. commit_tx ( tx_id, & conn) ? ;
10711071 program_state. commit_state = CommitState :: CommitingMvcc { state_machine } ;
10721072 }
10731073 let CommitState :: CommitingMvcc { state_machine } = & mut program_state. commit_state
@@ -1314,7 +1314,12 @@ impl<'a> FromValueRow<'a> for &'a Value {
13141314
13151315impl Row {
13161316 pub fn get < ' a , T : FromValueRow < ' a > + ' a > ( & ' a self , idx : usize ) -> Result < T > {
1317- let value = unsafe { self . values . add ( idx) . as_ref ( ) . unwrap ( ) } ;
1317+ let value = unsafe {
1318+ self . values
1319+ . add ( idx)
1320+ . as_ref ( )
1321+ . expect ( "row value pointer should be valid" )
1322+ } ;
13181323 let value = match value {
13191324 Register :: Value ( value) => value,
13201325 _ => unreachable ! ( "a row should be formed of values only" ) ,
@@ -1323,7 +1328,12 @@ impl Row {
13231328 }
13241329
13251330 pub fn get_value ( & self , idx : usize ) -> & Value {
1326- let value = unsafe { self . values . add ( idx) . as_ref ( ) . unwrap ( ) } ;
1331+ let value = unsafe {
1332+ self . values
1333+ . add ( idx)
1334+ . as_ref ( )
1335+ . expect ( "row value pointer should be valid" )
1336+ } ;
13271337 match value {
13281338 Register :: Value ( value) => value,
13291339 _ => unreachable ! ( "a row should be formed of values only" ) ,
0 commit comments