Skip to content

Commit

Permalink
fix build problem #20
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Nov 24, 2024
1 parent 6b955b6 commit e436f0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/locks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,14 @@ impl<'a> WriteLockStrategySealed<'a> for SingleWriter {
}
}

#[cfg(unix)]
impl<'a> WriteLockStrategy<'a> for SingleWriter {}

/// A simple guard which does not release the lock upon being dropped.
#[cfg(unix)]
pub struct SingleWriterGuard<'a>(&'a mut MmapMut);

#[cfg(unix)]
impl<'a> Deref for SingleWriterGuard<'a> {
type Target = MmapMut;

Expand All @@ -158,6 +160,7 @@ impl<'a> Deref for SingleWriterGuard<'a> {
}
}

#[cfg(unix)]
impl<'a> DerefMut for SingleWriterGuard<'a> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut *self.0
Expand Down

0 comments on commit e436f0d

Please sign in to comment.