diff options
author | Andreu Botella <andreu@andreubotella.com> | 2022-05-13 10:36:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 10:36:31 +0200 |
commit | 3e7afb8918fd0f6cedf839a7ebaae6aaee5e66ad (patch) | |
tree | 7fcc92da290889d3d2290f6e4902ac60685aae87 /runtime/ops/os.rs | |
parent | 0ee76da07b12fba38962634e65853d73adf9d4c0 (diff) |
chore(runtime): Make some ops in ext and runtime infallible. (#14589)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
Diffstat (limited to 'runtime/ops/os.rs')
-rw-r--r-- | runtime/ops/os.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/ops/os.rs b/runtime/ops/os.rs index ad2ff60ea..c74a423ab 100644 --- a/runtime/ops/os.rs +++ b/runtime/ops/os.rs @@ -103,13 +103,12 @@ fn op_delete_env(state: &mut OpState, key: String) -> Result<(), AnyError> { } #[op] -fn op_set_exit_code(state: &mut OpState, code: i32) -> Result<(), AnyError> { +fn op_set_exit_code(state: &mut OpState, code: i32) { state.borrow_mut::<Arc<AtomicI32>>().store(code, Relaxed); - Ok(()) } #[op] -fn op_exit(state: &mut OpState) -> Result<(), AnyError> { +fn op_exit(state: &mut OpState) { let code = state.borrow::<Arc<AtomicI32>>().load(Relaxed); std::process::exit(code) } |