MCPcopy Create free account
hub / github.com/cosdata/cosdata / new

Method new

src/models/lru_cache.rs:32–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30#[allow(unused)]
31impl EvictionIndex {
32 fn new() -> Self {
33 Self {
34 // @NOTE: Uses inline constants; will only work for msrv =
35 // 1.79.0
36 inner: core::array::from_fn(|_| AtomicU64::new(u64::MAX)),
37 }
38 }
39
40 fn idx(counter: u32) -> usize {
41 counter as usize % 256

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected