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/mutex/guard.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mutex/guard.rs') diff --git a/src/mutex/guard.rs b/src/mutex/guard.rs index f7a01a4..4e4d5f1 100644 --- a/src/mutex/guard.rs +++ b/src/mutex/guard.rs @@ -34,6 +34,7 @@ impl Ord for MutexRef<'_, T, R> { } #[mutants::skip] // hashing involves RNG and is hard to test +#[cfg(not(tarpaulin_include))] impl Hash for MutexRef<'_, T, R> { fn hash(&self, state: &mut H) { self.deref().hash(state) @@ -41,6 +42,7 @@ impl Hash for MutexRef<'_, T, R> { } #[mutants::skip] +#[cfg(not(tarpaulin_include))] impl Debug for MutexRef<'_, T, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) @@ -106,6 +108,7 @@ impl<'a, T: ?Sized, R: RawMutex> MutexRef<'a, T, R> { // there's nothing i can do about that #[mutants::skip] // it's hard to get two guards safely +#[cfg(not(tarpaulin_include))] impl PartialEq for MutexGuard<'_, '_, T, Key, R> { fn eq(&self, other: &Self) -> bool { self.deref().eq(&**other) @@ -113,9 +116,11 @@ impl PartialEq for MutexGuard< } #[mutants::skip] // it's hard to get two guards safely +#[cfg(not(tarpaulin_include))] impl Eq for MutexGuard<'_, '_, T, Key, R> {} #[mutants::skip] // it's hard to get two guards safely +#[cfg(not(tarpaulin_include))] impl PartialOrd for MutexGuard<'_, '_, T, Key, R> { @@ -125,6 +130,7 @@ impl PartialOrd } #[mutants::skip] // it's hard to get two guards safely +#[cfg(not(tarpaulin_include))] impl Ord for MutexGuard<'_, '_, T, Key, R> { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.deref().cmp(&**other) @@ -132,6 +138,7 @@ impl Ord for MutexGuard<'_, '_, T, K } #[mutants::skip] // hashing involves RNG and is hard to test +#[cfg(not(tarpaulin_include))] impl Hash for MutexGuard<'_, '_, T, Key, R> { fn hash(&self, state: &mut H) { self.deref().hash(state) @@ -139,6 +146,7 @@ impl Hash for MutexGuard<'_, '_, T, } #[mutants::skip] +#[cfg(not(tarpaulin_include))] impl Debug for MutexGuard<'_, '_, T, Key, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) -- cgit v1.2.3