style(clippy): auto-fix code style issues and unnecessary map_or allocations detected by cargo clippy
This commit is contained in:
1 parent
febd48c65d
commit
706e9ad172
9 files changed
+131
-74
No files matched your search
+3
-1
@@ -28,7 +28,9 @@ impl<T: DeserializeOwned + Default + Serialize + Clone + Send + Sync + 'static>
|
||||
let key_inner = key_clone.clone();
|
||||
let json_data = {
|
||||
let lock = cache_clone.read().unwrap_or_else(|e| e.into_inner());
|
||||
serde_json::to_vec(&*lock).map_err(|e| tracing::error!("Failed to serialize memory store: {}", e)).ok()
|
||||
serde_json::to_vec(&*lock)
|
||||
.map_err(|e| tracing::error!("Failed to serialize memory store: {}", e))
|
||||
.ok()
|
||||
};
|
||||
|
||||
if let Some(json_data) = json_data {
|
||||
|
||||
Reference in new issue
Block a user