Skip to content

Commit 9234767

Browse files
authored
fix: blob cache weighter
1 parent 5ec690f commit 9234767

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/blob_cache.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ impl From<(ValueLogId, ValueHandle)> for CacheKey {
2222
struct BlobWeighter;
2323

2424
impl Weighter<CacheKey, Item> for BlobWeighter {
25-
// NOTE: quick_cache only supports u32 as weight, but that's fine
26-
// 4 GB blobs are too big anyway
2725
#[allow(clippy::cast_possible_truncation)]
28-
fn weight(&self, _: &CacheKey, blob: &Item) -> u32 {
29-
blob.len() as u32
26+
fn weight(&self, _: &CacheKey, blob: &Item) -> u64 {
27+
blob.len() as u64
3028
}
3129
}
3230

0 commit comments

Comments
 (0)