From 1139b39c0a15ed3b841999cee2b02bfa50fcae6a Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Wed, 2 Oct 2024 11:56:53 +1300 Subject: Remove unused unsafe from_array transmutation method. --- src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 98a3858..cbda0c6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,9 +32,6 @@ impl Colour { value <<= 8; value |= blue as u32; Self { value } } - pub fn from_array(array: &[u8; 3]) -> &Colour { - unsafe { std::mem::transmute::<&[u8; 3], &Colour>(array) } - } pub fn mix(bg: Self, fg: Self, proportion: Proportion) -> Self { let proportion = Proportion::::new(proportion.as_u8()); let bg_mix = proportion.invert(); -- cgit v1.2.3-70-g09d2