Skip to content

Commit 8845d8e

Browse files
authored
Merge pull request #1241 from ttencate/feature/rect2i_hash
Derive `Hash` for `Rect2i`
2 parents c6be825 + d4e6fa0 commit 8845d8e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

godot-core/src/builtin/color.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ impl ApproxEq for Color {
373373
}
374374

375375
/// Defines how individual color channels are laid out in memory.
376-
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
376+
#[derive(Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Debug)]
377377
pub enum ColorChannelOrder {
378378
/// RGBA channel order. Godot's default.
379379
RGBA,

godot-core/src/builtin/projection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ impl ProjectionPlane {
595595
}
596596

597597
/// The eye to create a projection for, when creating a projection adjusted for head-mounted displays.
598-
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
598+
#[derive(Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Debug)]
599599
#[repr(C)]
600600
pub enum ProjectionEye {
601601
LEFT = 1,

godot-core/src/builtin/rect2i.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use sys::{ffi_methods, ExtVariantType, GodotFfi};
3131
/// # Godot docs
3232
///
3333
/// [`Rect2i` (stable)](https://docs.godotengine.org/en/stable/classes/class_rect2i.html)
34-
#[derive(Default, Copy, Clone, Eq, PartialEq, Debug)]
34+
#[derive(Default, Copy, Clone, Eq, PartialEq, Hash, Debug)]
3535
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3636
#[repr(C)]
3737
pub struct Rect2i {

godot-core/src/builtin/vectors/vector_axis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ macro_rules! impl_vector_axis_enum {
1616
///
1717
#[doc = concat!("`", stringify!($Vector), "` implements `Index<", stringify!($AxisEnum), ">` and `IndexMut<", stringify!($AxisEnum), ">`")]
1818
#[doc = ", so you can use this type to access a vector component as `vec[axis]`."]
19-
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug)]
19+
#[derive(Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd, Debug)]
2020
#[repr(i32)]
2121
pub enum $AxisEnum {
2222
$(

0 commit comments

Comments
 (0)