fix:Apply suggestions from clippy 1.88

This commit is contained in:
houseme
2025-06-27 18:16:29 +08:00
parent 35489ea352
commit 749537664f
108 changed files with 642 additions and 682 deletions
+3 -4
View File
@@ -62,7 +62,7 @@ impl std::fmt::Display for Key {
if self.compress {
file_name.push_str(COMPRESS_EXT);
}
write!(f, "{}", file_name)
write!(f, "{file_name}")
}
}
@@ -377,7 +377,7 @@ where
match deserializer.next() {
Some(Ok(item)) => items.push(item),
Some(Err(e)) => {
return Err(StoreError::Deserialization(format!("Failed to deserialize item in batch: {}", e)));
return Err(StoreError::Deserialization(format!("Failed to deserialize item in batch: {e}")));
}
None => {
// Reached end of stream sooner than item_count
@@ -393,8 +393,7 @@ where
} else if items.is_empty() {
// No items at all, but file existed
return Err(StoreError::Deserialization(format!(
"No items deserialized for key {} though file existed.",
key
"No items deserialized for key {key} though file existed."
)));
}
break;