Create a new cache with given capacity
(capacity: usize)
| 17 | impl NormalizationCache { |
| 18 | /// Create a new cache with given capacity |
| 19 | pub fn new(capacity: usize) -> Self { |
| 20 | Self { |
| 21 | cache: FxHashMap::with_capacity_and_hasher( |
| 22 | capacity, |
| 23 | BuildHasherDefault::default() |
| 24 | ), |
| 25 | capacity, |
| 26 | access_order: Vec::with_capacity(capacity), |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | /// Get cached WHNF result |
| 31 | pub fn get(&self, term: TermId) -> Option<TermId> { |
nothing calls this directly
no outgoing calls
no test coverage detected