Skip to content

Commit

Permalink
Remove deprecated image::into_reader()
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex committed Jan 14, 2024
1 parent 71244cf commit c29d2c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions neothesia/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,8 @@ fn set_window_icon(window: &winit::window::Window) -> Result<(), Box<dyn std::er

let (w, h) = icon.dimensions();

let mut icon = icon.into_reader()?;

let mut buff = Vec::new();
icon.read_to_end(&mut buff)?;
let mut buff = vec![0; icon.total_bytes() as usize];
icon.read_image(&mut buff)?;

window.set_window_icon(Some(winit::window::Icon::from_rgba(buff, w, h)?));

Expand Down

0 comments on commit c29d2c7

Please sign in to comment.