Skip to content

Commit

Permalink
Prevent immediate dereferences
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Sep 7, 2024
1 parent aae62dc commit e71caf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/img.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use webp::Encoder;
use super::http::{response_error, response_file};

pub fn save_image_to_webp(image: &image::DynamicImage, path: &PathBuf) -> Result<(), String> {
let encoder = match Encoder::from_image(&image) {
let encoder = match Encoder::from_image(image) {
Ok(e) => e,
Err(e) => {
return Err(e.to_string());
Expand Down

0 comments on commit e71caf3

Please sign in to comment.