Skip to content

Commit

Permalink
Remove unused traits and unnecessary import
Browse files Browse the repository at this point in the history
  • Loading branch information
Ogeon committed Feb 24, 2024
1 parent 449d044 commit ce86a27
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 29 deletions.
2 changes: 1 addition & 1 deletion palette/src/cast/array.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::mem::{transmute_copy, ManuallyDrop};

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

pub use palette_derive::ArrayCast;
Expand Down
3 changes: 0 additions & 3 deletions palette/src/hsl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,6 @@ unsafe impl<S: 'static, T> bytemuck::Pod for Hsl<S, T> where T: bytemuck::Pod {}
mod test {
use super::Hsl;

#[cfg(feature = "alloc")]
use crate::Srgb;

test_convert_into_from_xyz!(Hsl);

#[cfg(feature = "approx")]
Expand Down
3 changes: 0 additions & 3 deletions palette/src/hsv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,6 @@ unsafe impl<S: 'static, T> bytemuck::Pod for Hsv<S, T> where T: bytemuck::Pod {}
mod test {
use super::Hsv;

#[cfg(feature = "alloc")]
use crate::Srgb;

test_convert_into_from_xyz!(Hsv);

#[cfg(feature = "approx")]
Expand Down
5 changes: 1 addition & 4 deletions palette/src/hues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
#[cfg(any(feature = "approx", feature = "random"))]
use core::ops::Mul;

use core::{
cmp::PartialEq,
ops::{Add, AddAssign, Neg, Sub, SubAssign},
};
use core::ops::{Add, AddAssign, Neg, Sub, SubAssign};

#[cfg(feature = "approx")]
use approx::{AbsDiffEq, RelativeEq, UlpsEq};
Expand Down
3 changes: 0 additions & 3 deletions palette/src/hwb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,6 @@ unsafe impl<S: 'static, T> bytemuck::Pod for Hwb<S, T> where T: bytemuck::Pod {}
mod test {
use super::Hwb;

#[cfg(feature = "alloc")]
use crate::Srgb;

test_convert_into_from_xyz!(Hwb);

#[cfg(feature = "approx")]
Expand Down
15 changes: 0 additions & 15 deletions palette_derive/src/meta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,6 @@ impl ::quote::ToTokens for IdentOrIndex {
}
}

pub trait MetaParser: Default {
fn internal(&mut self);
fn parse_attribute(&mut self, attribute_name: Ident, attribute_tts: TokenStream) -> Result<()>;
}

pub trait DataMetaParser: Default {
fn parse_struct_field_attribute(
&mut self,
field_name: IdentOrIndex,
ty: Type,
attribute_name: Ident,
attribute_tts: TokenStream,
) -> Result<()>;
}

pub trait AttributeArgumentParser: Default {
fn argument(&mut self, argument: Meta) -> Result<()>;
}
Expand Down

0 comments on commit ce86a27

Please sign in to comment.