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>
This commit is contained in:
renovate[bot] 2022-03-09 23:28:39 -03:00 committed by GitHub
parent 66c52f0ac8
commit cf53761718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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" ]

View File

@ -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 {