From 8284676f50eed1832a009a694d3aeff9286080dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 20:33:52 +0000 Subject: [PATCH] chore(deps): bump rgb from 0.8.52 to 0.8.53 in the rust-dependencies group (#789) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alejandro González --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/png/mod.rs | 3 +-- src/reduction/color.rs | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9fbc57d5..986f350e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -484,9 +484,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.52" +version = "0.8.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" dependencies = [ "bytemuck", ] diff --git a/Cargo.toml b/Cargo.toml index 6847f9a8..8e001ffa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ libdeflater = "1.25.2" log = "0.4.29" parse-size = { version = "1.1.0", optional = true } rayon = { version = "1.11.0", optional = true } -rgb = "0.8.52" +rgb = "0.8.53" rustc-hash = "2.1.1" zopfli = { version = "0.8.3", optional = true, default-features = false, features = ["std", "zlib"] } diff --git a/src/png/mod.rs b/src/png/mod.rs index f29d583f..d653199c 100644 --- a/src/png/mod.rs +++ b/src/png/mod.rs @@ -3,7 +3,6 @@ use std::{fs, path::Path, sync::Arc}; use bitvec::bitarr; use libdeflater::{CompressionLvl, Compressor}; use log::warn; -use rgb::ComponentSlice; use rustc_hash::FxHashMap; use crate::{ @@ -192,7 +191,7 @@ impl PngData { ColorType::Indexed { palette } => { let mut palette_data = Vec::with_capacity(palette.len() * 3); for px in palette { - palette_data.extend_from_slice(px.rgb().as_slice()); + palette_data.extend_from_slice(px.rgb().as_ref()); } write_png_block(b"PLTE", &palette_data, &mut output); if let Some(last_trns) = palette.iter().rposition(|px| px.a != 255) { diff --git a/src/reduction/color.rs b/src/reduction/color.rs index 2836e656..565fb5fc 100644 --- a/src/reduction/color.rs +++ b/src/reduction/color.rs @@ -1,7 +1,7 @@ use std::hash::{BuildHasherDefault, Hash}; use indexmap::IndexSet; -use rgb::{ComponentMap, ComponentSlice, FromSlice, RGB, RGBA, alt::Gray}; +use rgb::{ComponentMap, FromSlice, RGB, RGBA, alt::Gray}; use rustc_hash::FxHasher; use crate::{ @@ -193,7 +193,7 @@ pub fn indexed_to_channels( let mut data = Vec::with_capacity(out_size); for b in &png.data { let color = palette.get(*b as usize).unwrap_or(&black); - data.extend_from_slice(&color.as_slice()[ch_start..=ch_end]); + data.extend_from_slice(&color.as_ref()[ch_start..=ch_end]); } Some(PngImage {