Cargo format

This commit is contained in:
Shawn Wallace 2024-07-07 16:44:47 -04:00
parent 03a0e1754d
commit 5150791e76
3 changed files with 32 additions and 21 deletions

View file

@ -1316,9 +1316,9 @@ fn reposition_popup() {
popup, popup,
popup, popup,
x::WINDOW_NONE, x::WINDOW_NONE,
40, // x 40, // x
60, // y 60, // y
80, // width 80, // width
100, // height 100, // height
0, 0,
true, true,
@ -1335,12 +1335,15 @@ fn reposition_popup() {
Some(testwl::Vec2 { x: 80, y: 100 }) Some(testwl::Vec2 { x: 80, y: 100 })
); );
let win_data = &f.connection().windows[&popup]; let win_data = &f.connection().windows[&popup];
assert_eq!(win_data.dims, WindowDims { assert_eq!(
x: 40, win_data.dims,
y: 60, WindowDims {
width: 80, x: 40,
height: 100 y: 60,
}); width: 80,
height: 100
}
);
} }
#[test] #[test]
@ -1353,9 +1356,9 @@ fn ignore_toplevel_reconfigure() {
toplevel, toplevel,
toplevel, toplevel,
x::WINDOW_NONE, x::WINDOW_NONE,
40, // x 40, // x
60, // y 60, // y
80, // width 80, // width
100, // height 100, // height
0, 0,
true, true,
@ -1363,12 +1366,15 @@ fn ignore_toplevel_reconfigure() {
f.run(); f.run();
let win_data = &f.connection().windows[&toplevel]; let win_data = &f.connection().windows[&toplevel];
assert_eq!(win_data.dims, WindowDims { assert_eq!(
x: 0, win_data.dims,
y: 0, WindowDims {
width: 100, x: 0,
height: 100 y: 0,
}); width: 100,
height: 100
}
);
} }
/// See Pointer::handle_event for an explanation. /// See Pointer::handle_event for an explanation.

View file

@ -669,8 +669,14 @@ fn copy_from_x11() {
assert_ne!(window, owner.owner()); assert_ne!(window, owner.owner());
let mimes = f.testwl.data_source_mimes(); let mimes = f.testwl.data_source_mimes();
assert!(mimes.contains(&"text/plain".into()), "text/plain not in mimes: {mimes:?}"); // mime1 assert!(
assert!(mimes.contains(&"blah/blah".into()), "blah/blah not in mimes: {mimes:?}"); // mime2 mimes.contains(&"text/plain".into()),
"text/plain not in mimes: {mimes:?}"
); // mime1
assert!(
mimes.contains(&"blah/blah".into()),
"blah/blah not in mimes: {mimes:?}"
); // mime2
let data = f.testwl.paste_data(); let data = f.testwl.paste_data();
f.testwl.dispatch(); f.testwl.dispatch();

View file

@ -232,7 +232,6 @@ impl State {
self.configure_serial += 1; self.configure_serial += 1;
} }
#[track_caller] #[track_caller]
fn get_toplevel(&mut self, surface_id: SurfaceId) -> &mut Toplevel { fn get_toplevel(&mut self, surface_id: SurfaceId) -> &mut Toplevel {
let surface = self let surface = self