Skip to content

Commit

Permalink
Remove derives from deref types as these had unintended uses. (#520)
Browse files Browse the repository at this point in the history
Fixes #518
  • Loading branch information
bitshifter authored Jun 4, 2024
1 parent 22a7460 commit c95f107
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/deref.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd)]
#[cfg_attr(target_arch = "spirv", repr(simd))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
pub struct XY<T> {
pub x: T,
pub y: T,
}

#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd)]
#[cfg(not(feature = "scalar-math"))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
pub struct Vec3<T> {
Expand All @@ -15,7 +7,7 @@ pub struct Vec3<T> {
pub z: T,
}

#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd)]
#[cfg(not(feature = "scalar-math"))]
#[cfg_attr(target_arch = "spirv", repr(simd))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
pub struct Vec4<T> {
Expand All @@ -25,22 +17,20 @@ pub struct Vec4<T> {
pub w: T,
}

#[derive(Clone, Copy, Default, PartialEq, Eq, PartialOrd)]
#[cfg(not(feature = "scalar-math"))]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
pub struct Cols2<V> {
pub x_axis: V,
pub y_axis: V,
}

#[derive(Clone, Copy, Default, PartialEq, Eq, PartialOrd)]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
pub struct Cols3<V> {
pub x_axis: V,
pub y_axis: V,
pub z_axis: V,
}

#[derive(Clone, Copy, Default, PartialEq, Eq, PartialOrd)]
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
pub struct Cols4<V> {
pub x_axis: V,
Expand Down

0 comments on commit c95f107

Please sign in to comment.