summaryrefslogtreecommitdiff
path: root/src/collection/owned.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/collection/owned.rs
parent280a61ad7b74019c7aad8b7306a0dd7cfb11359c (diff)
Tests and optimization
Diffstat (limited to 'src/collection/owned.rs')
-rw-r--r--src/collection/owned.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/collection/owned.rs b/src/collection/owned.rs
index a96300d..4a0d1ef 100644
--- a/src/collection/owned.rs
+++ b/src/collection/owned.rs
@@ -8,6 +8,7 @@ use crate::Keyable;
use super::{utils, LockGuard, OwnedLockCollection};
#[mutants::skip] // it's hard to test individual locks in an OwnedLockCollection
+#[cfg(not(tarpaulin_include))]
fn get_locks<L: Lockable>(data: &L) -> Vec<&dyn RawLock> {
let mut locks = Vec::new();
data.get_ptrs(&mut locks);
@@ -16,6 +17,7 @@ fn get_locks<L: Lockable>(data: &L) -> Vec<&dyn RawLock> {
unsafe impl<L: Lockable> RawLock for OwnedLockCollection<L> {
#[mutants::skip] // this should never run
+ #[cfg(not(tarpaulin_include))]
fn poison(&self) {
let locks = get_locks(&self.data);
for lock in locks {
@@ -63,6 +65,7 @@ unsafe impl<L: Lockable> Lockable for OwnedLockCollection<L> {
Self: 'g;
#[mutants::skip] // It's hard to test lkocks in an OwnedLockCollection, because they're owned
+ #[cfg(not(tarpaulin_include))]
fn get_ptrs<'a>(&'a self, ptrs: &mut Vec<&'a dyn RawLock>) {
self.data.get_ptrs(ptrs)
}