diff options
Diffstat (limited to 'src/collection')
| -rw-r--r-- | src/collection/boxed.rs | 1 | ||||
| -rw-r--r-- | src/collection/guard.rs | 6 | ||||
| -rw-r--r-- | src/collection/owned.rs | 2 | ||||
| -rw-r--r-- | src/collection/ref.rs | 1 |
4 files changed, 10 insertions, 0 deletions
diff --git a/src/collection/boxed.rs b/src/collection/boxed.rs index 7a84b2a..98d7632 100644 --- a/src/collection/boxed.rs +++ b/src/collection/boxed.rs @@ -154,6 +154,7 @@ impl<T, L: AsRef<T>> AsRef<T> for BoxedLockCollection<L> { } } +#[mutants::skip] impl<L: Debug> Debug for BoxedLockCollection<L> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct(stringify!(BoxedLockCollection)) diff --git a/src/collection/guard.rs b/src/collection/guard.rs index fc8df30..9412343 100644 --- a/src/collection/guard.rs +++ b/src/collection/guard.rs @@ -6,32 +6,38 @@ use crate::key::Keyable; use super::LockGuard; +#[mutants::skip] // it's hard to get two guards safely impl<Guard: PartialEq, Key: Keyable> PartialEq for LockGuard<'_, Guard, Key> { fn eq(&self, other: &Self) -> bool { self.guard.eq(&other.guard) } } +#[mutants::skip] // it's hard to get two guards safely impl<Guard: PartialOrd, Key: Keyable> PartialOrd for LockGuard<'_, Guard, Key> { fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> { self.guard.partial_cmp(&other.guard) } } +#[mutants::skip] // it's hard to get two guards safely impl<Guard: Eq, Key: Keyable> Eq for LockGuard<'_, Guard, Key> {} +#[mutants::skip] // it's hard to get two guards safely impl<Guard: Ord, Key: Keyable> Ord for LockGuard<'_, Guard, Key> { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.guard.cmp(&other.guard) } } +#[mutants::skip] // hashing involves RNG and is hard to test impl<Guard: Hash, Key: Keyable> Hash for LockGuard<'_, Guard, Key> { fn hash<H: std::hash::Hasher>(&self, state: &mut H) { self.guard.hash(state) } } +#[mutants::skip] impl<Guard: Debug, Key: Keyable> Debug for LockGuard<'_, Guard, Key> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) diff --git a/src/collection/owned.rs b/src/collection/owned.rs index 8e8afce..a96300d 100644 --- a/src/collection/owned.rs +++ b/src/collection/owned.rs @@ -7,6 +7,7 @@ use crate::Keyable; use super::{utils, LockGuard, OwnedLockCollection}; +#[mutants::skip] // it's hard to test individual locks in an OwnedLockCollection fn get_locks<L: Lockable>(data: &L) -> Vec<&dyn RawLock> { let mut locks = Vec::new(); data.get_ptrs(&mut locks); @@ -61,6 +62,7 @@ unsafe impl<L: Lockable> Lockable for OwnedLockCollection<L> { where Self: 'g; + #[mutants::skip] // It's hard to test lkocks in an OwnedLockCollection, because they're owned fn get_ptrs<'a>(&'a self, ptrs: &mut Vec<&'a dyn RawLock>) { self.data.get_ptrs(ptrs) } diff --git a/src/collection/ref.rs b/src/collection/ref.rs index 2f4db20..512bdec 100644 --- a/src/collection/ref.rs +++ b/src/collection/ref.rs @@ -108,6 +108,7 @@ impl<T, L: AsRef<T>> AsRef<T> for RefLockCollection<'_, L> { } } +#[mutants::skip] impl<L: Debug> Debug for RefLockCollection<'_, L> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct(stringify!(RefLockCollection)) |
