diff options
| author | DrMeepster <19316085+DrMeepster@users.noreply.github.com> | 2022-10-18 23:50:39 -0700 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-10-20 22:19:06 +0200 |
| commit | b649b96bc82b1691c4948ead6b43b4d058acd539 (patch) | |
| tree | e7e5b2af29428b727cdb99f44cbdf5ec028dd50d /src | |
| parent | 7cf32a7d47778080af38bed9e40add6c7c8b1f01 (diff) | |
| download | rust-b649b96bc82b1691c4948ead6b43b4d058acd539.tar.gz rust-b649b96bc82b1691c4948ead6b43b4d058acd539.zip | |
remove redundant Ok(...?)
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/miri/src/concurrency/sync.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/tools/miri/src/concurrency/sync.rs b/src/tools/miri/src/concurrency/sync.rs index 2ec852b413e..02b6c09cd51 100644 --- a/src/tools/miri/src/concurrency/sync.rs +++ b/src/tools/miri/src/concurrency/sync.rs @@ -315,9 +315,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { offset: u64, ) -> InterpResult<'tcx, RwLockId> { let this = self.eval_context_mut(); - this.rwlock_get_or_create( - |ecx, next_id| Ok(ecx.get_or_create_id(next_id, lock_op, offset)?), - ) + this.rwlock_get_or_create(|ecx, next_id| ecx.get_or_create_id(next_id, lock_op, offset)) } fn condvar_get_or_create_id( @@ -326,9 +324,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { offset: u64, ) -> InterpResult<'tcx, CondvarId> { let this = self.eval_context_mut(); - this.condvar_get_or_create(|ecx, next_id| { - Ok(ecx.get_or_create_id(next_id, lock_op, offset)?) - }) + this.condvar_get_or_create(|ecx, next_id| ecx.get_or_create_id(next_id, lock_op, offset)) } fn init_once_get_or_create_id( @@ -337,9 +333,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { offset: u64, ) -> InterpResult<'tcx, InitOnceId> { let this = self.eval_context_mut(); - this.init_once_get_or_create(|ecx, next_id| { - Ok(ecx.get_or_create_id(next_id, lock_op, offset)?) - }) + this.init_once_get_or_create(|ecx, next_id| ecx.get_or_create_id(next_id, lock_op, offset)) } #[inline] |
