Forráskód Böngészése

chore(deps) Update Rust crate png to 0.17 (#3652)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
renovate[bot] 3 éve
szülő
commit
cf53761718
2 módosított fájl, 5 hozzáadás és 5 törlés
  1. 1 1
      core/tauri-codegen/Cargo.toml
  2. 4 4
      core/tauri-codegen/src/context.rs

+ 1 - 1
core/tauri-codegen/Cargo.toml

@@ -31,7 +31,7 @@ uuid = { version = "0.8", features = [ "v4" ] }
 ico = "0.1"
 
 [target."cfg(target_os = \"linux\")".dependencies]
-png = "0.16"
+png = "0.17"
 
 [features]
 default = [ "compression" ]

+ 4 - 4
core/tauri-codegen/src/context.rs

@@ -410,15 +410,15 @@ fn png_icon<P: AsRef<Path>>(
     .unwrap_or_else(|_| panic!("failed to read window icon {}", path.display()))
     .to_vec();
   let decoder = png::Decoder::new(std::io::Cursor::new(bytes));
-  let (info, mut reader) = decoder
+  let mut reader = decoder
     .read_info()
     .unwrap_or_else(|_| panic!("failed to read window icon {}", path.display()));
   let mut buffer: Vec<u8> = Vec::new();
   while let Ok(Some(row)) = reader.next_row() {
-    buffer.extend(row);
+    buffer.extend(row.data());
   }
-  let width = info.width;
-  let height = info.height;
+  let width = reader.info().width;
+  let height = reader.info().height;
 
   let out_path = out_dir.join(path.file_name().unwrap());
   let mut out_file = File::create(&out_path).map_err(|error| EmbeddedAssetsError::AssetWrite {