summaryrefslogtreecommitdiff
path: root/runtime/ops/os.rs
diff options
context:
space:
mode:
authorAndreu Botella <andreu@andreubotella.com>2022-05-13 10:36:31 +0200
committerGitHub <noreply@github.com>2022-05-13 10:36:31 +0200
commit3e7afb8918fd0f6cedf839a7ebaae6aaee5e66ad (patch)
tree7fcc92da290889d3d2290f6e4902ac60685aae87 /runtime/ops/os.rs
parent0ee76da07b12fba38962634e65853d73adf9d4c0 (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.rs5
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)
}