From 5ec690f1e646e5f138a75cb0f98f7aec3700529b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 05:37:13 +0000 Subject: [PATCH 1/2] fix(deps): update rust crate quick_cache to 0.6.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 9b4189d..3914996 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ lz4_flex = { version = "0.11.3", optional = true } min-max-heap = "1.3.0" miniz_oxide = { version = "0.7.3", optional = true } path-absolutize = "3.1.1" -quick_cache = "0.5.1" +quick_cache = "0.6.0" serde = { version = "1.0.200", optional = true, features = ["derive", "rc"] } tempfile = "3.10.1" From 9234767a82e4ac01d74f283130d84400f1d11ff9 Mon Sep 17 00:00:00 2001 From: Marvin <33938500+marvin-j97@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:46:59 +0200 Subject: [PATCH 2/2] fix: blob cache weighter --- src/blob_cache.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/blob_cache.rs b/src/blob_cache.rs index 045c9cb..fdd0a98 100644 --- a/src/blob_cache.rs +++ b/src/blob_cache.rs @@ -22,11 +22,9 @@ impl From<(ValueLogId, ValueHandle)> for CacheKey { struct BlobWeighter; impl Weighter for BlobWeighter { - // NOTE: quick_cache only supports u32 as weight, but that's fine - // 4 GB blobs are too big anyway #[allow(clippy::cast_possible_truncation)] - fn weight(&self, _: &CacheKey, blob: &Item) -> u32 { - blob.len() as u32 + fn weight(&self, _: &CacheKey, blob: &Item) -> u64 { + blob.len() as u64 } }