Skip to content

Commit 0b6541e

Browse files
committed
Clippy
1 parent 9ba0143 commit 0b6541e

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

crates/egui_demo_lib/src/demo/demo_app_windows.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ fn file_menu_button(ui: &mut Ui) {
371371
#[cfg(test)]
372372
mod tests {
373373
use crate::{demo::demo_app_windows::DemoGroups, Demo as _};
374-
use egui::Vec2;
375-
use egui_kittest::kittest::{NodeT, Queryable as _};
374+
375+
use egui_kittest::kittest::{NodeT as _, Queryable as _};
376376
use egui_kittest::{Harness, SnapshotOptions, SnapshotResults};
377377

378378
#[test]

crates/egui_kittest/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ mod snapshot;
1010
#[cfg(feature = "snapshot")]
1111
pub use snapshot::*;
1212
use std::fmt::{Debug, Display, Formatter};
13-
use std::ops::DerefMut;
1413
use std::time::Duration;
1514

1615
mod app_kind;
@@ -228,7 +227,7 @@ impl<'a, State> Harness<'a, State> {
228227
/// This will call the app closure with each queued event and
229228
/// update the Harness.
230229
pub fn step(&mut self) {
231-
let events = std::mem::take(self.queued_events.lock().deref_mut());
230+
let events = std::mem::take(&mut *self.queued_events.lock());
232231
if events.is_empty() {
233232
self._step(false);
234233
}
@@ -515,7 +514,7 @@ impl<'a, State> Harness<'a, State> {
515514
/// Press a key.
516515
/// This will create a key down event and a key up event.
517516
pub fn key_press(&self, key: egui::Key) {
518-
self.key_combination(&[key])
517+
self.key_combination(&[key]);
519518
}
520519

521520
/// Press a key with modifiers.

crates/egui_kittest/src/node.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl<'tree> NodeT<'tree> for Node<'tree> {
3636
}
3737
}
3838

39-
impl<'tree> Node<'tree> {
39+
impl Node<'_> {
4040
fn event(&self, event: egui::Event) {
4141
self.queue.lock().push(EventType::Event(event));
4242
}
@@ -46,7 +46,7 @@ impl<'tree> Node<'tree> {
4646
}
4747

4848
pub fn hover(&self) {
49-
self.event(egui::Event::PointerMoved(self.rect().center()))
49+
self.event(egui::Event::PointerMoved(self.rect().center()));
5050
}
5151

5252
pub fn click(&self) {
@@ -70,7 +70,7 @@ impl<'tree> Node<'tree> {
7070
button,
7171
pressed,
7272
modifiers: Modifiers::default(),
73-
})
73+
});
7474
}
7575
}
7676

@@ -87,7 +87,7 @@ impl<'tree> Node<'tree> {
8787
button,
8888
pressed,
8989
modifiers,
90-
})
90+
});
9191
}
9292
self.modifiers(Modifiers::default());
9393
}
@@ -99,7 +99,7 @@ impl<'tree> Node<'tree> {
9999
action: accesskit::Action::Click,
100100
data: None,
101101
},
102-
))
102+
));
103103
}
104104

105105
pub fn rect(&self) -> egui::Rect {

crates/egui_kittest/tests/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use egui::{include_image, Key, Modifiers, Vec2};
1+
use egui::{include_image, Modifiers, Vec2};
22
use egui_kittest::Harness;
33
use kittest::Queryable as _;
44

tests/egui_tests/tests/test_widgets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use egui::load::SizedTexture;
22
use egui::{
33
include_image, Align, Button, Color32, ColorImage, Direction, DragValue, Event, Grid, Layout,
4-
PointerButton, Pos2, Response, Slider, Stroke, StrokeKind, TextWrapMode, TextureHandle,
4+
PointerButton, Response, Slider, Stroke, StrokeKind, TextWrapMode, TextureHandle,
55
TextureOptions, Ui, UiBuilder, Vec2, Widget as _,
66
};
77
use egui_kittest::kittest::{by, Queryable as _};

0 commit comments

Comments
 (0)