From f6b38f7425a3183214dae79445446b042154688f Mon Sep 17 00:00:00 2001 From: Botahamec Date: Wed, 5 Feb 2025 20:31:00 -0500 Subject: Tests and optimization --- src/rwlock/read_guard.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/rwlock/read_guard.rs') diff --git a/src/rwlock/read_guard.rs b/src/rwlock/read_guard.rs index 2195e44..bd22837 100644 --- a/src/rwlock/read_guard.rs +++ b/src/rwlock/read_guard.rs @@ -34,6 +34,7 @@ impl Ord for RwLockReadRef<'_, T, R> { } #[mutants::skip] // hashing involves PRNG and is hard to test +#[cfg(not(tarpaulin_include))] impl Hash for RwLockReadRef<'_, T, R> { fn hash(&self, state: &mut H) { self.deref().hash(state) @@ -41,6 +42,7 @@ impl Hash for RwLockReadRef<'_, T, R> { } #[mutants::skip] +#[cfg(not(tarpaulin_include))] impl Debug for RwLockReadRef<'_, T, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) @@ -88,6 +90,7 @@ impl<'a, T: ?Sized, R: RawRwLock> RwLockReadRef<'a, T, R> { } #[mutants::skip] // it's hard to get two read guards safely +#[cfg(not(tarpaulin_include))] impl PartialEq for RwLockReadGuard<'_, '_, T, Key, R> { @@ -97,9 +100,11 @@ impl PartialEq } #[mutants::skip] // it's hard to get two read guards safely +#[cfg(not(tarpaulin_include))] impl Eq for RwLockReadGuard<'_, '_, T, Key, R> {} #[mutants::skip] // it's hard to get two read guards safely +#[cfg(not(tarpaulin_include))] impl PartialOrd for RwLockReadGuard<'_, '_, T, Key, R> { @@ -109,6 +114,7 @@ impl PartialOrd } #[mutants::skip] // it's hard to get two read guards safely +#[cfg(not(tarpaulin_include))] impl Ord for RwLockReadGuard<'_, '_, T, Key, R> { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.deref().cmp(&**other) @@ -116,6 +122,7 @@ impl Ord for RwLockReadGuard<'_, '_ } #[mutants::skip] // hashing involves PRNG and is hard to test +#[cfg(not(tarpaulin_include))] impl Hash for RwLockReadGuard<'_, '_, T, Key, R> { fn hash(&self, state: &mut H) { self.deref().hash(state) @@ -123,6 +130,7 @@ impl Hash for RwLockReadGuard<'_, } #[mutants::skip] +#[cfg(not(tarpaulin_include))] impl Debug for RwLockReadGuard<'_, '_, T, Key, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) -- cgit v1.2.3