Skip to content

Commit ce86a27

Browse files
committed
Remove unused traits and unnecessary import
1 parent 449d044 commit ce86a27

File tree

6 files changed

+2
-29
lines changed

6 files changed

+2
-29
lines changed

palette/src/cast/array.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use core::mem::{transmute_copy, ManuallyDrop};
22

3-
#[cfg(feature = "alloc")]
3+
#[cfg(all(feature = "alloc", not(feature = "std")))]
44
use alloc::{boxed::Box, vec::Vec};
55

66
pub use palette_derive::ArrayCast;

palette/src/hsl.rs

-3
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,6 @@ unsafe impl<S: 'static, T> bytemuck::Pod for Hsl<S, T> where T: bytemuck::Pod {}
533533
mod test {
534534
use super::Hsl;
535535

536-
#[cfg(feature = "alloc")]
537-
use crate::Srgb;
538-
539536
test_convert_into_from_xyz!(Hsl);
540537

541538
#[cfg(feature = "approx")]

palette/src/hsv.rs

-3
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,6 @@ unsafe impl<S: 'static, T> bytemuck::Pod for Hsv<S, T> where T: bytemuck::Pod {}
540540
mod test {
541541
use super::Hsv;
542542

543-
#[cfg(feature = "alloc")]
544-
use crate::Srgb;
545-
546543
test_convert_into_from_xyz!(Hsv);
547544

548545
#[cfg(feature = "approx")]

palette/src/hues.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
#[cfg(any(feature = "approx", feature = "random"))]
44
use core::ops::Mul;
55

6-
use core::{
7-
cmp::PartialEq,
8-
ops::{Add, AddAssign, Neg, Sub, SubAssign},
9-
};
6+
use core::ops::{Add, AddAssign, Neg, Sub, SubAssign};
107

118
#[cfg(feature = "approx")]
129
use approx::{AbsDiffEq, RelativeEq, UlpsEq};

palette/src/hwb.rs

-3
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,6 @@ unsafe impl<S: 'static, T> bytemuck::Pod for Hwb<S, T> where T: bytemuck::Pod {}
366366
mod test {
367367
use super::Hwb;
368368

369-
#[cfg(feature = "alloc")]
370-
use crate::Srgb;
371-
372369
test_convert_into_from_xyz!(Hwb);
373370

374371
#[cfg(feature = "approx")]

palette_derive/src/meta/mod.rs

-15
Original file line numberDiff line numberDiff line change
@@ -207,21 +207,6 @@ impl ::quote::ToTokens for IdentOrIndex {
207207
}
208208
}
209209

210-
pub trait MetaParser: Default {
211-
fn internal(&mut self);
212-
fn parse_attribute(&mut self, attribute_name: Ident, attribute_tts: TokenStream) -> Result<()>;
213-
}
214-
215-
pub trait DataMetaParser: Default {
216-
fn parse_struct_field_attribute(
217-
&mut self,
218-
field_name: IdentOrIndex,
219-
ty: Type,
220-
attribute_name: Ident,
221-
attribute_tts: TokenStream,
222-
) -> Result<()>;
223-
}
224-
225210
pub trait AttributeArgumentParser: Default {
226211
fn argument(&mut self, argument: Meta) -> Result<()>;
227212
}

0 commit comments

Comments
 (0)