Skip to content

Commit e6cfb69

Browse files
Shaturcart
authored andcommitted
Derive PartialEq for InputFocus (#22402)
# Objective - Right now you can't do the the following: ```rust focus.set_if_neq(InputFocus(Some(trigger.entity))); ``` ## Solution - Derive `PartialEq` for `InputFocus`
1 parent a38bd56 commit e6cfb69

File tree

1 file changed

+1
-1
lines changed
  • crates/bevy_input_focus/src

1 file changed

+1
-1
lines changed

crates/bevy_input_focus/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ use bevy_reflect::{prelude::*, Reflect};
8585
/// world.insert_resource(InputFocus::from_entity(entity));
8686
/// }
8787
/// ```
88-
#[derive(Clone, Debug, Default, Resource)]
88+
#[derive(Clone, Debug, Default, Resource, PartialEq)]
8989
#[cfg_attr(
9090
feature = "bevy_reflect",
9191
derive(Reflect),

0 commit comments

Comments
 (0)