From 2ca454b402d48c1808f8233c5adedc11b714c63c Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Sun, 15 Aug 2021 13:29:19 +0200 Subject: 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 ... --- runtime/ops/process.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/ops/process.rs') 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::(rid) - .ok_or_else(bad_resource_id)?; + .get::(rid)?; let mut child = resource.borrow_mut().await; let run_status = child.wait().await?; let code = run_status.code(); -- cgit v1.2.3