Skip to content

Commit 1bed65a

Browse files
committed
fix: apply cargo fmt formatting to fix CI issues
1 parent 1dbe921 commit 1bed65a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

crates/core/src/cache.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,24 @@ where
3030
}
3131
}
3232

33+
impl<K, V> Cache<K, V> for InMemoryCache<K, V>
34+
where
35+
K: Eq + std::hash::Hash + Clone + Send + Sync,
36+
V: Clone + Send + Sync,
37+
{
38+
fn get(&self, key: &K) -> Option<V> {
39+
self.map.get(key).map(|value| value.clone())
40+
}
41+
42+
fn set(&self, key: K, value: V) {
43+
self.map.insert(key, value);
44+
}
45+
46+
fn clear(&self) {
47+
self.map.clear();
48+
}
49+
}
50+
3351
impl<K, V> Default for InMemoryCache<K, V>
3452
where
3553
K: Eq + std::hash::Hash + Clone + Send + Sync,

0 commit comments

Comments
 (0)