Skip to content

Commit

Permalink
chore: upgrade deps (#810)
Browse files Browse the repository at this point in the history
Signed-off-by: MrCroxx <[email protected]>
  • Loading branch information
MrCroxx authored Dec 2, 2024
1 parent 706d133 commit 026eea4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions foyer-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fastrace = { workspace = true }
flume = "0.11"
foyer-common = { workspace = true }
foyer-memory = { workspace = true }
fs4 = "0.9.1"
fs4 = { version = "0.12", default-features = false }
futures = "0.3"
hashbrown = { workspace = true }
itertools = { workspace = true }
Expand All @@ -46,7 +46,7 @@ serde = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
twox-hash = "1"
twox-hash = "2"
zstd = "0.13"

[dev-dependencies]
Expand Down
10 changes: 3 additions & 7 deletions foyer-storage/src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::{fmt::Debug, hash::Hasher, io::Write, time::Instant};
use std::{fmt::Debug, io::Write, time::Instant};

use foyer_common::{
code::{StorageKey, StorageValue},
Expand All @@ -30,15 +30,11 @@ pub struct Checksummer;

impl Checksummer {
pub fn checksum64(buf: &[u8]) -> u64 {
let mut hasher = XxHash64::with_seed(0);
hasher.write(buf);
hasher.finish()
XxHash64::oneshot(0, buf)
}

pub fn checksum32(buf: &[u8]) -> u32 {
let mut hasher = XxHash32::with_seed(0);
hasher.write(buf);
hasher.finish() as u32
XxHash32::oneshot(0, buf)
}
}

Expand Down

0 comments on commit 026eea4

Please sign in to comment.