Skip to content

Commit 1541727

Browse files
AustinHellerRepomockersf
authored andcommitted
added Hash to MouseScrollUnit; (#17538)
# Objective This allows for the usage of the MouseScrollUnit as a key to a HashSet and HashMap. I have a need for this, but this basic functionality is currently missing. ## Solution Add the derive Hash attribute to the MouseScrollUnit type. ## Testing - Did you test these changes? If so, how? No, but I did perform a `cargo build`. My laptop is failing to run `cargo test` without crashing. - Are there any parts that need more testing? If someone could run a `cargo test` for completeness, that would be great but this is a trivial change. - How can other people (reviewers) test your changes? Is there anything specific they need to know? They simply need to ensure that the common Hash derive macro works as expected for the basic MouseScrollUnit type. - If relevant, what platforms did you test these changes on, and are there any important ones you can't test? Ubuntu 22.04
1 parent 483f2d5 commit 1541727

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_input/src/mouse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub struct MouseMotion {
104104
///
105105
/// The value of the event can either be interpreted as the amount of lines or the amount of pixels
106106
/// to scroll.
107-
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
107+
#[derive(Debug, Hash, Clone, Copy, Eq, PartialEq)]
108108
#[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Debug, PartialEq))]
109109
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
110110
#[cfg_attr(

0 commit comments

Comments
 (0)