Fix deprecation warning in the window icon example

This commit is contained in:
Philippe Renon 2020-11-26 01:20:35 +01:00 committed by GitHub
parent 77d5d20391
commit f79efec7ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,7 @@ fn load_icon(path: &Path) -> Icon {
let (icon_rgba, icon_width, icon_height) = { let (icon_rgba, icon_width, icon_height) = {
let image = image::open(path) let image = image::open(path)
.expect("Failed to open icon path") .expect("Failed to open icon path")
.into_rgba(); .into_rgba8();
let (width, height) = image.dimensions(); let (width, height) = image.dimensions();
let rgba = image.into_raw(); let rgba = image.into_raw();
(rgba, width, height) (rgba, width, height)