Skip to content

Commit c15c315

Browse files
committed
fix: add cmp PartialEq to State
1 parent bc62013 commit c15c315

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

graphics/src/widget/qr_code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ where
140140
/// The state of a [`QRCode`].
141141
///
142142
/// It stores the data that will be displayed.
143-
#[derive(Debug)]
143+
#[derive(Debug, PartialEq)]
144144
pub struct State {
145145
contents: Vec<qrcode::Color>,
146146
width: usize,

native/src/overlay/menu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ where
115115
}
116116

117117
/// The local state of a [`Menu`].
118-
#[derive(Debug)]
118+
#[derive(Debug, PartialEq)]
119119
pub struct State {
120120
tree: Tree,
121121
}

native/src/widget/image/viewer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ where
336336
}
337337

338338
/// The local state of a [`Viewer`].
339-
#[derive(Debug, Clone, Copy)]
339+
#[derive(Debug, Clone, Copy, PartialEq)]
340340
pub struct State {
341341
scale: f32,
342342
starting_offset: Vector,

native/src/widget/mouse_area.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'a, Message, Renderer> MouseArea<'a, Message, Renderer> {
6868
}
6969

7070
/// Local state of the [`MouseArea`].
71-
#[derive(Default)]
71+
#[derive(Default, PartialEq)]
7272
struct State {
7373
// TODO: Support on_mouse_enter and on_mouse_exit
7474
}

native/src/widget/scrollable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ fn notify_on_scroll<Message>(
947947
}
948948

949949
/// The local state of a [`Scrollable`].
950-
#[derive(Debug, Clone, Copy)]
950+
#[derive(Debug, Clone, Copy, PartialEq)]
951951
pub struct State {
952952
scroll_area_touched_at: Option<Point>,
953953
offset_y: Offset,

native/src/widget/text_input.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ pub fn mouse_interaction(
11341134
}
11351135

11361136
/// The state of a [`TextInput`].
1137-
#[derive(Debug, Default, Clone)]
1137+
#[derive(Debug, Default, Clone, PartialEq)]
11381138
pub struct State {
11391139
is_focused: Option<Focus>,
11401140
is_dragging: bool,

0 commit comments

Comments
 (0)