e
Diffstat (limited to 'src/color.rs')
-rwxr-xr-xsrc/color.rs13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/color.rs b/src/color.rs
index 96efe3b..780f0c3 100755
--- a/src/color.rs
+++ b/src/color.rs
@@ -6,8 +6,7 @@ mod simd;
pub use serial::BlurU32;
pub use simd::u32xN;
-
-use std::simd::{LaneCount, Simd, SupportedLaneCount};
+use std::simd::prelude::*;
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Debug, Default)]
@@ -28,10 +27,7 @@ impl From<Argb<BlurU32>> for u32 {
}
}
-impl<const N: usize> From<[u32; N]> for Argb<u32xN<N>>
-where
- LaneCount<N>: SupportedLaneCount,
-{
+impl<const N: usize> From<[u32; N]> for Argb<u32xN<N>> {
fn from(values: [u32; N]) -> Self {
let arrs: [[u8; 4]; N] = values.map(u32::to_be_bytes);
Self([
@@ -43,10 +39,7 @@ where
}
}
-impl<const N: usize> From<Argb<u32xN<N>>> for [u32; N]
-where
- LaneCount<N>: SupportedLaneCount,
-{
+impl<const N: usize> From<Argb<u32xN<N>>> for [u32; N] {
fn from(value: Argb<u32xN<N>>) -> Self {
let [a, r, g, b] = value.0.map(|i| i.0.to_array());
std::array::from_fn(|i| u32::from_be_bytes([a[i], r[i], g[i], b[i]].map(|x| x as u8)))