Skip to content

Commit 156087d

Browse files
committed
fix: format memory.rs after inline format args change
1 parent ea7ce59 commit 156087d

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

crates/cache/src/memory.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ impl std::fmt::Debug for MemoryCache {
3939

4040
impl Cache for MemoryCache {
4141
async fn get(&self, key: &str) -> Result<Option<Bytes>, CacheError> {
42-
let mut cache =
43-
self.cache.lock().map_err(|e| CacheError(format!("lock poisoned: {e}")))?;
42+
let mut cache = self.cache.lock().map_err(|e| CacheError(format!("lock poisoned: {e}")))?;
4443

4544
if let Some(entry) = cache.get(key) {
4645
if entry.expires_at > Instant::now() {
@@ -53,8 +52,7 @@ impl Cache for MemoryCache {
5352
}
5453

5554
async fn put(&self, key: &str, value: Bytes, ttl: Duration) -> Result<(), CacheError> {
56-
let mut cache =
57-
self.cache.lock().map_err(|e| CacheError(format!("lock poisoned: {e}")))?;
55+
let mut cache = self.cache.lock().map_err(|e| CacheError(format!("lock poisoned: {e}")))?;
5856

5957
let entry = CacheEntry { value, expires_at: Instant::now() + ttl };
6058

@@ -63,8 +61,7 @@ impl Cache for MemoryCache {
6361
}
6462

6563
async fn delete(&self, key: &str) -> Result<(), CacheError> {
66-
let mut cache =
67-
self.cache.lock().map_err(|e| CacheError(format!("lock poisoned: {e}")))?;
64+
let mut cache = self.cache.lock().map_err(|e| CacheError(format!("lock poisoned: {e}")))?;
6865

6966
cache.pop(key);
7067
Ok(())

0 commit comments

Comments
 (0)