summaryrefslogtreecommitdiff
path: root/src/collection/retry.rs
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2026-02-07 10:45:11 -0500
committerMica White <botahamec@outlook.com>2026-02-07 10:45:11 -0500
commit2096d0c6819ce0e8f6c6e77e36ebc495924dad63 (patch)
treefcee36a7aa3e3d77a8d57d1585d6ee095b4ff676 /src/collection/retry.rs
parent9d928375ffc365d9ae4f4bc9be4a3c08fae47387 (diff)
Rename data to child
Diffstat (limited to 'src/collection/retry.rs')
-rwxr-xr-xsrc/collection/retry.rs48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/collection/retry.rs b/src/collection/retry.rs
index e127c20..64e8ca8 100755
--- a/src/collection/retry.rs
+++ b/src/collection/retry.rs
@@ -35,14 +35,14 @@ unsafe impl<L: Lockable> RawLock for RetryingLockCollection<L> {
#[mutants::skip] // this should never run
#[cfg(not(tarpaulin_include))]
fn poison(&self) {
- let locks = get_locks_unsorted(&self.data);
+ let locks = get_locks_unsorted(&self.child);
for lock in locks {
lock.poison();
}
}
unsafe fn raw_write(&self) {
- let locks = get_locks_unsorted(&self.data);
+ let locks = get_locks_unsorted(&self.child);
if locks.is_empty() {
// this probably prevents a panic later
@@ -104,7 +104,7 @@ unsafe impl<L: Lockable> RawLock for RetryingLockCollection<L> {
}
unsafe fn raw_try_write(&self) -> bool {
- let locks = get_locks_unsorted(&self.data);
+ let locks = get_locks_unsorted(&self.child);
if locks.is_empty() {
// this is an interesting case, but it doesn't give us access to
@@ -134,7 +134,7 @@ unsafe impl<L: Lockable> RawLock for RetryingLockCollection<L> {
}
unsafe fn raw_unlock_write(&self) {
- let locks = get_locks_unsorted(&self.data);
+ let locks = get_locks_unsorted(&self.child);
for lock in locks {
lock.raw_unlock_write();
@@ -142,7 +142,7 @@ unsafe impl<L: Lockable> RawLock for RetryingLockCollection<L> {
}
unsafe fn raw_read(&self) {
- let locks = get_locks_unsorted(&self.data);
+ let locks = get_locks_unsorted(&self.child);
if locks.is_empty() {
// this probably prevents a panic later
@@ -195,7 +195,7 @@ unsafe impl<L: Lockable> RawLock for RetryingLockCollection<L> {
}
unsafe fn raw_try_read(&self) -> bool {
- let locks = get_locks_unsorted(&self.data);
+ let locks = get_locks_unsorted(&self.child);
if locks.is_empty() {
// this is an interesting case, but it doesn't give us access to
@@ -224,7 +224,7 @@ unsafe impl<L: Lockable> RawLock for RetryingLockCollection<L> {
}
unsafe fn raw_unlock_read(&self) {
- let locks = get_locks_unsorted(&self.data);
+ let locks = get_locks_unsorted(&self.child);
for lock in locks {
lock.raw_unlock_read();
@@ -246,15 +246,15 @@ unsafe impl<L: Lockable> Lockable for RetryingLockCollection<L> {
fn get_ptrs<'a>(&'a self, ptrs: &mut Vec<&'a dyn RawLock>) {
// this collection, just like the sorting collection, must return all of its
// locks in order to check for duplication
- self.data.get_ptrs(ptrs)
+ self.child.get_ptrs(ptrs)
}
unsafe fn guard(&self) -> Self::Guard<'_> {
- self.data.guard()
+ self.child.guard()
}
unsafe fn data_mut(&self) -> Self::DataMut<'_> {
- self.data.data_mut()
+ self.child.data_mut()
}
}
@@ -270,11 +270,11 @@ unsafe impl<L: Sharable> Sharable for RetryingLockCollection<L> {
Self: 'a;
unsafe fn read_guard(&self) -> Self::ReadGuard<'_> {
- self.data.read_guard()
+ self.child.read_guard()
}
unsafe fn data_ref(&self) -> Self::DataRef<'_> {
- self.data.data_ref()
+ self.child.data_ref()
}
}
@@ -287,7 +287,7 @@ impl<L: LockableGetMut> LockableGetMut for RetryingLockCollection<L> {
Self: 'a;
fn get_mut(&mut self) -> Self::Inner<'_> {
- self.data.get_mut()
+ self.child.get_mut()
}
}
@@ -295,7 +295,7 @@ impl<L: LockableIntoInner> LockableIntoInner for RetryingLockCollection<L> {
type Inner = L::Inner;
fn into_inner(self) -> Self::Inner {
- self.data.into_inner()
+ self.child.into_inner()
}
}
@@ -307,7 +307,7 @@ where
type IntoIter = <L as IntoIterator>::IntoIter;
fn into_iter(self) -> Self::IntoIter {
- self.data.into_iter()
+ self.child.into_iter()
}
}
@@ -319,7 +319,7 @@ where
type IntoIter = <&'a L as IntoIterator>::IntoIter;
fn into_iter(self) -> Self::IntoIter {
- self.data.into_iter()
+ self.child.into_iter()
}
}
@@ -331,7 +331,7 @@ where
type IntoIter = <&'a mut L as IntoIterator>::IntoIter;
fn into_iter(self) -> Self::IntoIter {
- self.data.into_iter()
+ self.child.into_iter()
}
}
@@ -346,19 +346,19 @@ impl<L: OwnedLockable, I: FromIterator<L> + OwnedLockable> FromIterator<L>
impl<E: OwnedLockable + Extend<L>, L: OwnedLockable> Extend<L> for RetryingLockCollection<E> {
fn extend<T: IntoIterator<Item = L>>(&mut self, iter: T) {
- self.data.extend(iter)
+ self.child.extend(iter)
}
}
impl<T: ?Sized, L: AsRef<T>> AsRef<T> for RetryingLockCollection<L> {
fn as_ref(&self) -> &T {
- self.data.as_ref()
+ self.child.as_ref()
}
}
impl<T: ?Sized, L: AsMut<T>> AsMut<T> for RetryingLockCollection<L> {
fn as_mut(&mut self) -> &mut T {
- self.data.as_mut()
+ self.child.as_mut()
}
}
@@ -442,7 +442,7 @@ impl<L> RetryingLockCollection<L> {
/// ```
#[must_use]
pub const unsafe fn new_unchecked(data: L) -> Self {
- Self { data }
+ Self { child: data }
}
/// Gets an immutable reference to the underlying collection.
@@ -463,7 +463,7 @@ impl<L> RetryingLockCollection<L> {
/// ```
#[must_use]
pub const fn child(&self) -> &L {
- &self.data
+ &self.child
}
/// Gets a mutable reference to the underlying collection.
@@ -484,7 +484,7 @@ impl<L> RetryingLockCollection<L> {
/// ```
#[must_use]
pub fn child_mut(&mut self) -> &mut L {
- &mut self.data
+ &mut self.child
}
/// Gets the underlying collection, consuming this collection.
@@ -505,7 +505,7 @@ impl<L> RetryingLockCollection<L> {
/// ```
#[must_use]
pub fn into_child(self) -> L {
- self.data
+ self.child
}
}