Skip to content

Commit

Permalink
Remove needless borrows
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Sep 5, 2024
1 parent 8300b82 commit c32637c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub async fn process_file_request(state: &AppState, path: &str) -> Result<Respon
return Ok(response_file(&file_path).await);
}

if fetch_and_cache(state.host.clone(), &file_path, &path)
if fetch_and_cache(state.host.clone(), &file_path, path)
.await
.is_err()
{
Expand Down
2 changes: 1 addition & 1 deletion src/utils/img.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn save_image_to_webp(image: &image::DynamicImage, path: &PathBuf) -> Result
};
let webp_memory = encoder.encode(100f32);

match write(&path, &*webp_memory) {
match write(path, &*webp_memory) {
Ok(_) => Ok(()),
Err(e) => Err(e.to_string()),
}
Expand Down

0 comments on commit c32637c

Please sign in to comment.