Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
al8n committed Sep 18, 2024
1 parent 9d5fc37 commit 8feddb7
Show file tree
Hide file tree
Showing 8 changed files with 775 additions and 381 deletions.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const HEADER_SIZE: usize = MAGIC_TEXT_SIZE + MAGIC_VERSION_SIZE;
test_swmr_generic_iters,
)
))]
#[cfg(test)]
#[macro_use]
mod tests;

Expand Down
26 changes: 0 additions & 26 deletions src/swmr/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,24 +360,6 @@ impl<K, V, S> GenericOrderWalCore<K, V, S> {
self.map.is_empty()
}

// #[inline]
// fn new(arena: Arena, magic_version: u16, flush: bool, reserved: u32) -> Result<Self, Error> {
// unsafe {
// let slice = arena.reserved_slice_mut();
// slice[0..6].copy_from_slice(&MAGIC_TEXT);
// slice[6..8].copy_from_slice(&magic_version.to_le_bytes());
// }

// if !flush {
// return Ok(Self::construct(arena, SkipSet::new(), reserved));
// }

// arena
// .flush_range(0, HEADER_SIZE)
// .map(|_| Self::construct(arena, SkipSet::new(), reserved))
// .map_err(Into::into)
// }

#[inline]
fn first(&self) -> Option<EntryRef<'_, K, V>>
where
Expand Down Expand Up @@ -839,14 +821,6 @@ where

Self::new_in(arena, opts, (), cks).map(Self::from_core)
}

// #[inline]
// fn from_core(core: GenericOrderWalCore<K, V>, opts: Options, cks: S, ro: bool) -> Self {
// Self {
// core: Arc::new(core),
// ro,
// }
// }
}

impl<K, V, S> GenericOrderWal<K, V, S>
Expand Down
4 changes: 0 additions & 4 deletions src/swmr/wal/tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
use tempfile::tempdir;

use crate::tests::*;

use super::*;

#[cfg(all(test, any(test_swmr_constructor, all_tests)))]
Expand Down
Loading

0 comments on commit 8feddb7

Please sign in to comment.