Skip to content

Commit c95f107

Browse files
authored
Remove derives from deref types as these had unintended uses. (#520)
Fixes #518
1 parent 22a7460 commit c95f107

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/deref.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd)]
2-
#[cfg_attr(target_arch = "spirv", repr(simd))]
3-
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
4-
pub struct XY<T> {
5-
pub x: T,
6-
pub y: T,
7-
}
8-
9-
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd)]
1+
#[cfg(not(feature = "scalar-math"))]
102
#[cfg_attr(target_arch = "spirv", repr(simd))]
113
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
124
pub struct Vec3<T> {
@@ -15,7 +7,7 @@ pub struct Vec3<T> {
157
pub z: T,
168
}
179

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

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

35-
#[derive(Clone, Copy, Default, PartialEq, Eq, PartialOrd)]
3627
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
3728
pub struct Cols3<V> {
3829
pub x_axis: V,
3930
pub y_axis: V,
4031
pub z_axis: V,
4132
}
4233

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

0 commit comments

Comments
 (0)