diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-08-15 13:29:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-15 13:29:19 +0200 |
commit | 2ca454b402d48c1808f8233c5adedc11b714c63c (patch) | |
tree | 592f9e877e9b0ae92be80383ab723cc290e4b01e /ext/ffi/lib.rs | |
parent | 18ff6bb053d600c277613628a256fe5fdd4dda67 (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 'ext/ffi/lib.rs')
-rw-r--r-- | ext/ffi/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
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<Value, AnyError> { let resource = state .resource_table - .get::<DynamicLibraryResource>(args.rid) - .ok_or_else(bad_resource_id)?; + .get::<DynamicLibraryResource>(args.rid)?; let symbol = resource .symbols |