Skip to content

Commit

Permalink
test: remove more loom code from coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromfedricci committed Aug 28, 2024
1 parent e8df132 commit 807ec80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/inner/raw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ impl<L: Lock> MutexNodeInner<L> {

/// Creates a new, locked, Loom based `MutexNodeInner` instance (non-const).
#[cfg(all(loom, test))]
#[cfg(not(tarpaulin_include))]
fn locked() -> Self {
let prev = Cell::null_mut();
let lock = Lock::locked();
Expand All @@ -48,6 +49,7 @@ impl<L: Lock> MutexNodeInner<L> {

/// Creates a new, unlocked, Loom based `MutexNodeInner` instance (non-const).
#[cfg(all(loom, test))]
#[cfg(not(tarpaulin_include))]
fn unlocked() -> Self {
let prev = Cell::null_mut();
let lock = Lock::unlocked();
Expand All @@ -62,6 +64,7 @@ impl<L: Lock> MutexNodeInner<L> {

/// Change the inner, Loom based lock state to locked.
#[cfg(all(loom, test))]
#[cfg(not(tarpaulin_include))]
fn lock(&mut self) {
self.lock = Lock::locked();
}
Expand Down

0 comments on commit 807ec80

Please sign in to comment.