Skip to content

Commit

Permalink
🎨 Fix clippy.
Browse files Browse the repository at this point in the history
  • Loading branch information
langyo committed Oct 12, 2024
1 parent 9f76d0b commit a6fc35e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/database/src/functions/backend/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ pub fn generate_thumbnail(hash: impl ToString, data: Bytes) -> Result<Bytes> {
std::fs::write(
{
let mut path = MEDIA_CACHE_DIR.clone();
path.push(&format!("{}.webp", hash.to_string()));
path.push(format!("{}.webp", hash.to_string()));
path
},
&image,
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/routes/frontend/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub async fn download_media(
// Try to read cache file.

let mut path = MEDIA_CACHE_DIR.clone();
path.push(&format!("{}.webp", db_key));
path.push(format!("{}.webp", db_key));

if let Ok(file_raw) = tokio::fs::read(path).await {
Bytes::from(file_raw)
Expand Down

0 comments on commit a6fc35e

Please sign in to comment.