diff --git a/ext/canvas/image_ops.rs b/ext/canvas/image_ops.rs index d8240980dd..5c4cf94998 100644 --- a/ext/canvas/image_ops.rs +++ b/ext/canvas/image_ops.rs @@ -34,7 +34,7 @@ impl PremultiplyAlpha for LumaA { let normalized_alpha = alpha.to_f32().unwrap() / max_t.to_f32().unwrap(); if normalized_alpha == 0.0 { - return LumaA::([pixel[0], pixel[alpha_index]]); + return LumaA([pixel[0], pixel[alpha_index]]); } for rgb in pixel.iter_mut().take(alpha_index) { @@ -42,7 +42,7 @@ impl PremultiplyAlpha for LumaA { .unwrap() } - LumaA::([pixel[0], pixel[alpha_index]]) + LumaA([pixel[0], pixel[alpha_index]]) } } @@ -56,7 +56,7 @@ impl PremultiplyAlpha for Rgba { let normalized_alpha = alpha.to_f32().unwrap() / max_t.to_f32().unwrap(); if normalized_alpha == 0.0 { - return Rgba::([pixel[0], pixel[1], pixel[2], pixel[alpha_index]]); + return Rgba([pixel[0], pixel[1], pixel[2], pixel[alpha_index]]); } for rgb in pixel.iter_mut().take(alpha_index) { @@ -64,7 +64,7 @@ impl PremultiplyAlpha for Rgba { .unwrap() } - Rgba::([pixel[0], pixel[1], pixel[2], pixel[alpha_index]]) + Rgba([pixel[0], pixel[1], pixel[2], pixel[alpha_index]]) } } @@ -152,7 +152,7 @@ impl UnpremultiplyAlpha for Rgba { .unwrap(); } - Rgba::([pixel[0], pixel[1], pixel[2], pixel[alpha_index]]) + Rgba([pixel[0], pixel[1], pixel[2], pixel[alpha_index]]) } } @@ -183,7 +183,7 @@ impl UnpremultiplyAlpha for LumaA { .unwrap(); } - LumaA::([pixel[0], pixel[alpha_index]]) + LumaA([pixel[0], pixel[alpha_index]]) } } @@ -249,7 +249,7 @@ impl SliceToPixel for Luma { let pixel: &[T] = cast_slice(pixel); let pixel = [pixel[0]]; - Luma::(pixel) + Luma(pixel) } } @@ -258,7 +258,7 @@ impl SliceToPixel for LumaA { let pixel: &[T] = cast_slice(pixel); let pixel = [pixel[0], pixel[1]]; - LumaA::(pixel) + LumaA(pixel) } } @@ -267,7 +267,7 @@ impl SliceToPixel for Rgb { let pixel: &[T] = cast_slice(pixel); let pixel = [pixel[0], pixel[1], pixel[2]]; - Rgb::(pixel) + Rgb(pixel) } } @@ -276,7 +276,7 @@ impl SliceToPixel for Rgba { let pixel: &[T] = cast_slice(pixel); let pixel = [pixel[0], pixel[1], pixel[2], pixel[3]]; - Rgba::(pixel) + Rgba(pixel) } } @@ -535,7 +535,7 @@ pub(crate) fn to_srgb_from_icc_profile( // let (r, g, b) = apply_conversion_matrix_srgb_to_display_p3(r, g, b); -// Rgb::([r, g, b]) +// Rgb([r, g, b]) // } // } @@ -545,7 +545,7 @@ pub(crate) fn to_srgb_from_icc_profile( // let (r, g, b) = apply_conversion_matrix_srgb_to_display_p3(r, g, b); -// Rgba::([r, g, b, a]) +// Rgba([r, g, b, a]) // } // }