From 0dd92e5986a42781bad2852afa020b28876b6b28 Mon Sep 17 00:00:00 2001 From: Nicolas Klenert Date: Mon, 29 Mar 2021 13:14:58 +0200 Subject: [PATCH] Reorder attributes Derive helper attributes should be introduced before they are used. --- palette/src/convert.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/palette/src/convert.rs b/palette/src/convert.rs index fd589f56d..94e32b134 100644 --- a/palette/src/convert.rs +++ b/palette/src/convert.rs @@ -532,6 +532,7 @@ mod tests { use crate::{Alpha, Hsl, Hsv, Hwb, Lab, Lch, Xyz, Yxy}; use crate::{FloatComponent, Limited}; + #[derive(FromColorUnclamped, WithAlpha)] #[palette( skip_derives(Xyz, Luma), white_point = "S::WhitePoint", @@ -540,7 +541,6 @@ mod tests { palette_internal, palette_internal_not_base_type )] - #[derive(FromColorUnclamped, WithAlpha)] struct WithXyz(PhantomData); impl Clone for WithXyz { @@ -601,6 +601,7 @@ mod tests { } } + #[derive(Copy, Clone, FromColorUnclamped, WithAlpha)] #[palette( skip_derives(Lch, Luma), white_point = "crate::white_point::E", @@ -609,7 +610,6 @@ mod tests { palette_internal, palette_internal_not_base_type )] - #[derive(Copy, Clone, FromColorUnclamped, WithAlpha)] struct WithoutXyz(PhantomData); impl Limited for WithoutXyz {