summaryrefslogtreecommitdiff
path: root/src/poisonable/error.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2025-02-05 20:31:00 -0500
committerBotahamec <botahamec@outlook.com>2025-02-05 20:31:00 -0500
commitf6b38f7425a3183214dae79445446b042154688f (patch)
tree1219d7cc4420ff4ad58a017c0f5861b7a2936f3b /src/poisonable/error.rs
parent280a61ad7b74019c7aad8b7306a0dd7cfb11359c (diff)
Tests and optimization
Diffstat (limited to 'src/poisonable/error.rs')
-rw-r--r--src/poisonable/error.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/poisonable/error.rs b/src/poisonable/error.rs
index 9721ce4..bff011d 100644
--- a/src/poisonable/error.rs
+++ b/src/poisonable/error.rs
@@ -4,6 +4,7 @@ use std::error::Error;
use super::{PoisonError, PoisonGuard, TryLockPoisonableError};
#[mutants::skip]
+#[cfg(not(tarpaulin_include))]
impl<Guard> fmt::Debug for PoisonError<Guard> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("PoisonError").finish_non_exhaustive()
@@ -12,6 +13,7 @@ impl<Guard> fmt::Debug for PoisonError<Guard> {
impl<Guard> fmt::Display for PoisonError<Guard> {
#[cfg_attr(test, mutants::skip)]
+ #[cfg(not(tarpaulin_include))]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
"poisoned lock: another task failed inside".fmt(f)
}
@@ -151,6 +153,7 @@ impl<Guard> PoisonError<Guard> {
}
#[mutants::skip]
+#[cfg(not(tarpaulin_include))]
impl<G, Key> fmt::Debug for TryLockPoisonableError<'_, '_, G, Key> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
@@ -162,6 +165,7 @@ impl<G, Key> fmt::Debug for TryLockPoisonableError<'_, '_, G, Key> {
impl<G, Key> fmt::Display for TryLockPoisonableError<'_, '_, G, Key> {
#[cfg_attr(test, mutants::skip)]
+ #[cfg(not(tarpaulin_include))]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
Self::Poisoned(..) => "poisoned lock: another task failed inside",