Skip to content

Commit da14532

Browse files
committed
fix startup cache dead code
1 parent ec1ad97 commit da14532

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

turbopack/crates/turbo-tasks-backend/src/database/startup_cache.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ pub struct StartupCacheLayer<T: KeyValueDatabase> {
9595
cache_size: AtomicUsize,
9696
cache: Cache,
9797
restored_map: ByKeySpace<FxHashMap<&'static [u8], &'static [u8]>>,
98-
restored: Vec<u8>,
98+
// Need to be kept around to keep the restored_map reference alive
99+
_restored: Vec<u8>,
99100
}
100101

101102
impl<T: KeyValueDatabase> StartupCacheLayer<T> {
@@ -138,7 +139,7 @@ impl<T: KeyValueDatabase> StartupCacheLayer<T> {
138139
Default::default(),
139140
)
140141
}),
141-
restored,
142+
_restored: restored,
142143
restored_map,
143144
})
144145
}

0 commit comments

Comments
 (0)