summaryrefslogtreecommitdiff
path: root/runtime/ops/process.rs
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-08-15 13:29:19 +0200
committerGitHub <noreply@github.com>2021-08-15 13:29:19 +0200
commit2ca454b402d48c1808f8233c5adedc11b714c63c (patch)
tree592f9e877e9b0ae92be80383ab723cc290e4b01e /runtime/ops/process.rs
parent18ff6bb053d600c277613628a256fe5fdd4dda67 (diff)
refactor(ops): return BadResource errors in ResourceTable calls (#11710)
* refactor(ops): return BadResource errors in ResourceTable calls Instead of relying on callers to map Options to Results via `.ok_or_else(bad_resource_id)` at over 176 different call sites ...
Diffstat (limited to 'runtime/ops/process.rs')
-rw-r--r--runtime/ops/process.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/ops/process.rs b/runtime/ops/process.rs
index 0f0cc6e2a..44ead73da 100644
--- a/runtime/ops/process.rs
+++ b/runtime/ops/process.rs
@@ -212,8 +212,7 @@ async fn op_run_status(
let resource = state
.borrow_mut()
.resource_table
- .get::<ChildResource>(rid)
- .ok_or_else(bad_resource_id)?;
+ .get::<ChildResource>(rid)?;
let mut child = resource.borrow_mut().await;
let run_status = child.wait().await?;
let code = run_status.code();