mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
Replace the SmallVec by a Vec
This commit is contained in:
parent
56329633d5
commit
91ec0bdaf4
@ -295,8 +295,8 @@ impl<K: Eq + Hash + Clone, V> ArcCache<K, V> {
|
|||||||
(self.frequent_set.get_mut(k), evicted)
|
(self.frequent_set.get_mut(k), evicted)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn push(&mut self, k: K, v: V) -> SmallVec<[(K, V); 2]> {
|
pub fn push(&mut self, k: K, v: V) -> Vec<(K, V)> {
|
||||||
let mut evicted = SmallVec::new();
|
let mut evicted = Vec::new();
|
||||||
|
|
||||||
if self.frequent_set.contains(&k) {
|
if self.frequent_set.contains(&k) {
|
||||||
if let Some(evicted_entry) = self.frequent_set.push(k, v) {
|
if let Some(evicted_entry) = self.frequent_set.push(k, v) {
|
||||||
|
Loading…
Reference in New Issue
Block a user