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 ... --- ext/ffi/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/ffi') diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs index 2100a4d53..cfff59953 100644 --- a/ext/ffi/lib.rs +++ b/ext/ffi/lib.rs @@ -329,8 +329,7 @@ fn op_ffi_call( ) -> Result { let resource = state .resource_table - .get::(args.rid) - .ok_or_else(bad_resource_id)?; + .get::(args.rid)?; let symbol = resource .symbols -- cgit v1.2.3