Skip to content

Commit fffd2b4

Browse files
Fix println formatting for touchpad tests
1 parent 1c27890 commit fffd2b4

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

examples/game-controller.rs

+30-3
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,36 @@ fn main() -> Result<(), String> {
8787
}
8888
Event::ControllerButtonDown { button, .. } => println!("Button {:?} down", button),
8989
Event::ControllerButtonUp { button, .. } => println!("Button {:?} up", button),
90-
Event::ControllerTouchpadDown { touchpad, finger, x, y, ..} => println!("Touchpad {touchpad} down finger:{finger} x:{x} y:{y}"),
91-
Event::ControllerTouchpadMotion { touchpad, finger, x, y, ..} => println!("Touchpad {touchpad} move finger:{finger} x:{x} y:{y}"),
92-
Event::ControllerTouchpadUp { touchpad, finger, x, y, ..} => println!("Touchpad {touchpad} up finger:{finger} x:{x} y:{y}"),
90+
Event::ControllerTouchpadDown {
91+
touchpad,
92+
finger,
93+
x,
94+
y,
95+
..
96+
} => println!(
97+
"Touchpad {} down finger:{} x:{} y:{}",
98+
touchpad, finger, x, y
99+
),
100+
Event::ControllerTouchpadMotion {
101+
touchpad,
102+
finger,
103+
x,
104+
y,
105+
..
106+
} => println!(
107+
"Touchpad {} move finger:{} x:{} y:{}",
108+
touchpad, finger, x, y
109+
),
110+
Event::ControllerTouchpadUp {
111+
touchpad,
112+
finger,
113+
x,
114+
y,
115+
..
116+
} => println!(
117+
"Touchpad {} up finger:{} x:{} y:{}",
118+
touchpad, finger, x, y
119+
),
93120
Event::Quit { .. } => break,
94121
_ => (),
95122
}

0 commit comments

Comments
 (0)