diff options
| author | Botahamec <botahamec@outlook.com> | 2025-01-12 15:04:01 -0500 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2025-01-12 15:04:01 -0500 |
| commit | 280a61ad7b74019c7aad8b7306a0dd7cfb11359c (patch) | |
| tree | 40d97d4e183c1bc551194944876b099d875f361d /src/collection/guard.rs | |
| parent | bf95904b3532a9175a7bfa14a3f216abbd15ee98 (diff) | |
More unit tests
Diffstat (limited to 'src/collection/guard.rs')
| -rw-r--r-- | src/collection/guard.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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) |
