Skip to content

Commit 7c989b5

Browse files
committed
Use match where more appropriate
1 parent 0ca4259 commit 7c989b5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fvm/src/call_manager/default.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -822,11 +822,10 @@ where
822822
// detected it and returned OutOfGas above. Any other invocation failure is returned
823823
// here as an Abort
824824

825-
if let Err(err) = res {
826-
return Err(err.into());
825+
match res {
826+
Ok(_) => Ok(out[0].unwrap_i32() as u32),
827+
Err(e) => Err(e.into()),
827828
}
828-
829-
Ok(out[0].unwrap_i32() as u32)
830829
})();
831830

832831
let invocation_data = store.into_data();

0 commit comments

Comments
 (0)