diff --git a/milli/src/update/new/extract/cache.rs b/milli/src/update/new/extract/cache.rs index 4f6f30e70..1c7db0473 100644 --- a/milli/src/update/new/extract/cache.rs +++ b/milli/src/update/new/extract/cache.rs @@ -11,7 +11,7 @@ use crate::CboRoaringBitmapCodec; #[derive(Debug)] pub struct CboCachedSorter { - cache: Lru, DelAddRoaringBitmap>, + cache: Lru, DelAddRoaringBitmap>, sorter: Sorter, deladd_buffer: Vec, cbo_buffer: Vec, diff --git a/milli/src/update/new/extract/lru.rs b/milli/src/update/new/extract/lru.rs index 7c13d9350..cfec6e157 100644 --- a/milli/src/update/new/extract/lru.rs +++ b/milli/src/update/new/extract/lru.rs @@ -59,10 +59,10 @@ impl Lru { Entry::Vacant(vac) => { let key = vac.key().clone(); if self.storage.is_full() { - let idx = self.storage.back_idx(); // It's fine to unwrap here because: // * the cache capacity is non zero // * the cache is full + let idx = self.storage.back_idx(); let node = self.storage.move_front(idx).unwrap(); let LruNode { key, value } = mem::replace(node, LruNode { key, value }); vac.insert(idx); @@ -128,8 +128,8 @@ struct FixedSizeList { // to find a free place. // TODO remove the free list as it is always growing: // we cannot remove entries from the map. - // Also, we probably do not need one of the front and back cursors. free: Vec, + // TODO Also, we probably do not need one of the front and back cursors. front: usize, back: usize, }