remove redundant Ok(...?)

This commit is contained in:
DrMeepster 2022-10-18 23:50:39 -07:00 committed by Ralf Jung
parent 7cf32a7d47
commit b649b96bc8

View File

@ -315,9 +315,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
offset: u64, offset: u64,
) -> InterpResult<'tcx, RwLockId> { ) -> InterpResult<'tcx, RwLockId> {
let this = self.eval_context_mut(); let this = self.eval_context_mut();
this.rwlock_get_or_create( this.rwlock_get_or_create(|ecx, next_id| ecx.get_or_create_id(next_id, lock_op, offset))
|ecx, next_id| Ok(ecx.get_or_create_id(next_id, lock_op, offset)?),
)
} }
fn condvar_get_or_create_id( fn condvar_get_or_create_id(
@ -326,9 +324,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
offset: u64, offset: u64,
) -> InterpResult<'tcx, CondvarId> { ) -> InterpResult<'tcx, CondvarId> {
let this = self.eval_context_mut(); let this = self.eval_context_mut();
this.condvar_get_or_create(|ecx, next_id| { this.condvar_get_or_create(|ecx, next_id| ecx.get_or_create_id(next_id, lock_op, offset))
Ok(ecx.get_or_create_id(next_id, lock_op, offset)?)
})
} }
fn init_once_get_or_create_id( fn init_once_get_or_create_id(
@ -337,9 +333,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
offset: u64, offset: u64,
) -> InterpResult<'tcx, InitOnceId> { ) -> InterpResult<'tcx, InitOnceId> {
let this = self.eval_context_mut(); let this = self.eval_context_mut();
this.init_once_get_or_create(|ecx, next_id| { this.init_once_get_or_create(|ecx, next_id| ecx.get_or_create_id(next_id, lock_op, offset))
Ok(ecx.get_or_create_id(next_id, lock_op, offset)?)
})
} }
#[inline] #[inline]