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/poisonable/guard.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/poisonable/guard.rs') diff --git a/src/poisonable/guard.rs b/src/poisonable/guard.rs index 36566f5..3f85d25 100644 --- a/src/poisonable/guard.rs +++ b/src/poisonable/guard.rs @@ -49,6 +49,7 @@ impl Ord for PoisonRef<'_, Guard> { } #[mutants::skip] // hashing involves RNG and is hard to test +#[cfg(not(tarpaulin_include))] impl Hash for PoisonRef<'_, Guard> { fn hash(&self, state: &mut H) { self.guard.hash(state) @@ -56,6 +57,7 @@ impl Hash for PoisonRef<'_, Guard> { } #[mutants::skip] +#[cfg(not(tarpaulin_include))] impl Debug for PoisonRef<'_, Guard> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&**self, f) @@ -95,6 +97,7 @@ impl AsMut for PoisonRef<'_, Guard> { } #[mutants::skip] // it's hard to get two guards safely +#[cfg(not(tarpaulin_include))] impl PartialEq for PoisonGuard<'_, '_, Guard, Key> { fn eq(&self, other: &Self) -> bool { self.guard.eq(&other.guard) @@ -102,6 +105,7 @@ impl PartialEq for PoisonGuard<'_, '_, Guard, Ke } #[mutants::skip] // it's hard to get two guards safely +#[cfg(not(tarpaulin_include))] impl PartialOrd for PoisonGuard<'_, '_, Guard, Key> { fn partial_cmp(&self, other: &Self) -> Option { self.guard.partial_cmp(&other.guard) @@ -109,9 +113,11 @@ impl PartialOrd for PoisonGuard<'_, '_, Guard, } #[mutants::skip] // it's hard to get two guards safely +#[cfg(not(tarpaulin_include))] impl Eq for PoisonGuard<'_, '_, Guard, Key> {} #[mutants::skip] // it's hard to get two guards safely +#[cfg(not(tarpaulin_include))] impl Ord for PoisonGuard<'_, '_, Guard, Key> { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.guard.cmp(&other.guard) @@ -119,6 +125,7 @@ impl Ord for PoisonGuard<'_, '_, Guard, Key> { } #[mutants::skip] // hashing involves RNG and is hard to test +#[cfg(not(tarpaulin_include))] impl Hash for PoisonGuard<'_, '_, Guard, Key> { fn hash(&self, state: &mut H) { self.guard.hash(state) @@ -126,6 +133,7 @@ impl Hash for PoisonGuard<'_, '_, Guard, Key> { } #[mutants::skip] +#[cfg(not(tarpaulin_include))] impl Debug for PoisonGuard<'_, '_, Guard, Key> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { Debug::fmt(&self.guard, f) -- cgit v1.2.3