diff options
| author | Botahamec <botahamec@outlook.com> | 2025-02-05 20:31:00 -0500 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2025-02-05 20:31:00 -0500 |
| commit | f6b38f7425a3183214dae79445446b042154688f (patch) | |
| tree | 1219d7cc4420ff4ad58a017c0f5861b7a2936f3b /src/rwlock/write_guard.rs | |
| parent | 280a61ad7b74019c7aad8b7306a0dd7cfb11359c (diff) | |
Tests and optimization
Diffstat (limited to 'src/rwlock/write_guard.rs')
| -rw-r--r-- | src/rwlock/write_guard.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rwlock/write_guard.rs b/src/rwlock/write_guard.rs index ff559b8..c971260 100644 --- a/src/rwlock/write_guard.rs +++ b/src/rwlock/write_guard.rs @@ -34,6 +34,7 @@ impl<T: Ord + ?Sized, R: RawRwLock> Ord for RwLockWriteRef<'_, T, R> { } #[mutants::skip] // hashing involves PRNG and is difficult to test +#[cfg(not(tarpaulin_include))] impl<T: Hash + ?Sized, R: RawRwLock> Hash for RwLockWriteRef<'_, T, R> { fn hash<H: std::hash::Hasher>(&self, state: &mut H) { self.deref().hash(state) @@ -41,6 +42,7 @@ impl<T: Hash + ?Sized, R: RawRwLock> Hash for RwLockWriteRef<'_, T, R> { } #[mutants::skip] +#[cfg(not(tarpaulin_include))] impl<T: Debug + ?Sized, R: RawRwLock> Debug for RwLockWriteRef<'_, T, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) @@ -103,6 +105,7 @@ impl<'a, T: ?Sized + 'a, R: RawRwLock> RwLockWriteRef<'a, T, R> { } #[mutants::skip] // it's hard to get two read guards safely +#[cfg(not(tarpaulin_include))] impl<T: PartialEq + ?Sized, R: RawRwLock, Key: Keyable> PartialEq for RwLockWriteGuard<'_, '_, T, Key, R> { @@ -112,9 +115,11 @@ impl<T: PartialEq + ?Sized, R: RawRwLock, Key: Keyable> PartialEq } #[mutants::skip] // it's hard to get two read guards safely +#[cfg(not(tarpaulin_include))] impl<T: Eq + ?Sized, R: RawRwLock, Key: Keyable> Eq for RwLockWriteGuard<'_, '_, T, Key, R> {} #[mutants::skip] // it's hard to get two read guards safely +#[cfg(not(tarpaulin_include))] impl<T: PartialOrd + ?Sized, R: RawRwLock, Key: Keyable> PartialOrd for RwLockWriteGuard<'_, '_, T, Key, R> { @@ -124,6 +129,7 @@ impl<T: PartialOrd + ?Sized, R: RawRwLock, Key: Keyable> PartialOrd } #[mutants::skip] // it's hard to get two read guards safely +#[cfg(not(tarpaulin_include))] impl<T: Ord + ?Sized, R: RawRwLock, Key: Keyable> Ord for RwLockWriteGuard<'_, '_, T, Key, R> { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.deref().cmp(&**other) @@ -131,6 +137,7 @@ impl<T: Ord + ?Sized, R: RawRwLock, Key: Keyable> Ord for RwLockWriteGuard<'_, ' } #[mutants::skip] // hashing involves PRNG and is difficult to test +#[cfg(not(tarpaulin_include))] impl<T: Hash + ?Sized, R: RawRwLock, Key: Keyable> Hash for RwLockWriteGuard<'_, '_, T, Key, R> { fn hash<H: std::hash::Hasher>(&self, state: &mut H) { self.deref().hash(state) @@ -138,6 +145,7 @@ impl<T: Hash + ?Sized, R: RawRwLock, Key: Keyable> Hash for RwLockWriteGuard<'_, } #[mutants::skip] +#[cfg(not(tarpaulin_include))] impl<T: Debug + ?Sized, Key: Keyable, R: RawRwLock> Debug for RwLockWriteGuard<'_, '_, T, Key, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) |
