From 3d11ac656c983d64cd58128cc4cece3c34f94d51 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 22 Mar 2022 15:07:41 -0300 Subject: [PATCH] chore(deps): update Rust crate png to 0.17 --- core/tauri/Cargo.toml | 2 +- core/tauri/src/lib.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 8fa119348..ecc406eca 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -90,7 +90,7 @@ glob = "0.3" data-url = { version = "0.1", optional = true } serialize-to-javascript = "=0.1.1" infer = { version = "0.7", optional = true } -png = { version = "0.16", optional = true } +png = { version = "0.17", optional = true } ico = { version = "0.1", optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index e27c3ca5f..dc088fd13 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -389,15 +389,15 @@ impl TryFrom for runtime::WindowIcon { #[cfg(feature = "icon-png")] "png" => { let decoder = png::Decoder::new(std::io::Cursor::new(bytes)); - let (info, mut reader) = decoder.read_info()?; + let mut reader = decoder.read_info()?; let mut buffer = Vec::new(); while let Ok(Some(row)) = reader.next_row() { - buffer.extend(row); + buffer.extend(row.data()); } Ok(Self { rgba: buffer, - width: info.width, - height: info.height, + width: reader.info().width, + height: reader.info().height, }) } _ => panic!(