Trap::I32Exit is a better name

This commit is contained in:
Pat Hickey
2021-01-06 13:25:37 -08:00
parent 1dab7c8f94
commit cd3adb1abd
4 changed files with 12 additions and 5 deletions

View File

@@ -717,7 +717,7 @@ impl<'a> WasiSnapshotPreview1 for WasiCtx {
fn proc_exit(&self, status: types::Exitcode) -> wiggle::Trap {
// Check that the status is within WASI's range.
if status < 126 {
wiggle::Trap::I32(status as i32)
wiggle::Trap::I32Exit(status as i32)
} else {
wiggle::Trap::String("exit with invalid exit status outside of [0..126)".to_owned())
}