(max_entries: usize)
| 14 | #[cfg(not(target_arch = "wasm32"))] |
| 15 | impl<K: Copy + Eq + Hash, V> SmallModelCache<K, V> { |
| 16 | pub(super) fn new(max_entries: usize) -> Self { |
| 17 | Self { |
| 18 | max_entries: max_entries.max(1), |
| 19 | order: VecDeque::new(), |
| 20 | values: HashMap::new(), |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | pub(super) fn get_or_try_insert_mut<E, F>(&mut self, key: K, init: F) -> Result<&mut V, E> |
| 25 | where |
nothing calls this directly
no outgoing calls
no test coverage detected