From 3856f0ea9cb7f66038633533014bd3535aa9377b Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Mon, 18 Nov 2024 14:21:07 +0100 Subject: [PATCH] Make avif/yuv.rs 1.70-compatible - Add `use std::mem::size_of` - Remove `pub` visibility where unnecessary --- src/codecs/avif/yuv.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/codecs/avif/yuv.rs b/src/codecs/avif/yuv.rs index 77155b3286..c0d6c414e1 100644 --- a/src/codecs/avif/yuv.rs +++ b/src/codecs/avif/yuv.rs @@ -2,15 +2,16 @@ use crate::error::DecodingError; use crate::{ImageError, ImageFormat}; use num_traits::AsPrimitive; use std::fmt::{Display, Formatter}; +use std::mem::size_of; #[derive(Debug, Copy, Clone)] /// Representation of inversion matrix struct CbCrInverseTransform { - pub y_coef: T, - pub cr_coef: T, - pub cb_coef: T, - pub g_coeff_1: T, - pub g_coeff_2: T, + y_coef: T, + cr_coef: T, + cb_coef: T, + g_coeff_1: T, + g_coeff_2: T, } impl CbCrInverseTransform { @@ -162,11 +163,11 @@ pub(crate) enum YuvIntensityRange { #[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] struct YuvChromaRange { - pub bias_y: u32, - pub bias_uv: u32, - pub range_y: u32, - pub range_uv: u32, - pub range: YuvIntensityRange, + bias_y: u32, + bias_uv: u32, + range_y: u32, + range_uv: u32, + range: YuvIntensityRange, } impl YuvIntensityRange {