diff options
Diffstat (limited to 'src/collection/utils.rs')
| -rwxr-xr-x | src/collection/utils.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/collection/utils.rs b/src/collection/utils.rs index 71a023e..e79b78b 100755 --- a/src/collection/utils.rs +++ b/src/collection/utils.rs @@ -227,7 +227,9 @@ pub unsafe fn attempt_to_recover_writes_from_panic(locks: &[&dyn RawLock]) { handle_unwind( || { // safety: the caller assumes that these are already locked - locks.iter().for_each(|lock| lock.raw_unlock_write()); + for lock in locks { + lock.raw_unlock_write(); + } }, // if we get another panic in here, we'll just have to poison what remains || locks.iter().for_each(|l| l.poison()), @@ -239,7 +241,9 @@ pub unsafe fn attempt_to_recover_reads_from_panic(locked: &[&dyn RawLock]) { handle_unwind( || { // safety: the caller assumes these are already locked - locked.iter().for_each(|lock| lock.raw_unlock_read()); + for lock in locked { + lock.raw_unlock_read(); + } }, // if we get another panic in here, we'll just have to poison what remains || locked.iter().for_each(|l| l.poison()), |
