Skip to content

Commit

Permalink
fix: clippy and fmt issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Jan 29, 2024
1 parent 7536784 commit 318e1c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
6 changes: 1 addition & 5 deletions crates/sss_lib/src/img.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,7 @@ pub fn generate_image(settings: GenerationSettings, content: impl DynImageConten
})
.unwrap();
}
make_output(
&img,
&settings.output,
settings.save_format.as_ref().map(|s| s.as_str()),
);
make_output(&img, &settings.output, settings.save_format.as_deref());
}

impl TryFrom<String> for Background {
Expand Down
7 changes: 1 addition & 6 deletions crates/sss_lib/src/out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ pub fn make_output(img: &ImageBuffer<Rgba<u8>, Vec<u8>>, output: &str, fmt: Opti
let mut stdout = std::io::stdout();
let encoder = PngEncoder::new(&mut stdout);
encoder
.write_image(
&img.to_vec(),
img.width(),
img.height(),
image::ColorType::Rgba8,
)
.write_image(img, img.width(), img.height(), image::ColorType::Rgba8)
.unwrap();
}
_ => {
Expand Down

0 comments on commit 318e1c7

Please sign in to comment.