From baa1984df1733bd24fb2b00ddff5d4b9ef301bba Mon Sep 17 00:00:00 2001 From: LucaCappelletti94 Date: Fri, 20 Sep 2024 08:43:40 +0200 Subject: [PATCH] Removed dead code --- src/lib.rs | 2 -- src/naive_integer_hash.rs | 36 ------------------------------------ 2 files changed, 38 deletions(-) delete mode 100644 src/naive_integer_hash.rs diff --git a/src/lib.rs b/src/lib.rs index 2f1813d..6a285bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,7 +20,6 @@ mod precisions; mod registers; pub mod sketches; pub mod utils; -mod naive_integer_hash; #[cfg(feature = "serde")] pub mod serde; @@ -36,5 +35,4 @@ pub mod prelude { pub use crate::sketches::*; pub use crate::utils::*; pub use core::ops::{BitOr, BitOrAssign}; - pub use crate::naive_integer_hash::NaiveIntegerHash; } diff --git a/src/naive_integer_hash.rs b/src/naive_integer_hash.rs deleted file mode 100644 index 0ddda7f..0000000 --- a/src/naive_integer_hash.rs +++ /dev/null @@ -1,36 +0,0 @@ -//! Submodule providing the 'NaiveIntegerHash' struct, which implements the -//! Hasher and BuildHasher traits for hashing integers in a naive way. - -use core::hash::{BuildHasher, Hasher}; - -#[derive(Default, Clone, Copy)] -/// Struct for hashing integers in a naive way. -pub struct NaiveIntegerHash { - state: u64, -} - -impl BuildHasher for NaiveIntegerHash { - type Hasher = NaiveIntegerHash; - - #[inline] - fn build_hasher(&self) -> Self::Hasher { - NaiveIntegerHash { state: 0 } - } -} - -impl Hasher for NaiveIntegerHash { - #[inline] - fn finish(&self) -> u64 { - self.state - } - - #[inline] - fn write_u64(&mut self, i: u64) { - self.state = i; - } - - #[inline] - fn write(&mut self, _bytes: &[u8]) { - unimplemented!() - } -} \ No newline at end of file