Closed
Description
It's probably best seen with the diff:
@@ -97,15 +92,24 @@ impl Game {
while let Some(event) = self.events.poll_event() {
debug!("Event: {:?}", event);
match event {
- Event::Quit { .. } |
- Event::KeyDown { keycode: Some(Keycode::Q), .. } => {
+ Event::Quit { .. }
+ | Event::KeyDown {
+ keycode: Some(Keycode::Q),
+ ..
+ } => {
if !self.state.stopped() {
self.state.stop();
}
return Ok(TopInstruction::Quit);
- },
- Event::KeyUp { keycode: Some(Keycode::Space), .. } |
- Event::KeyUp { keycode: Some(Keycode::P), .. } => self.pause_toggle()?,
+ }
+ Event::KeyUp {
+ keycode: Some(Keycode::Space),
+ ..
+ }
+ | Event::KeyUp {
+ keycode: Some(Keycode::P),
+ ..
+ } => self.pause_toggle()?,
_ => (),
}
}
I believe it's nicer to place the |
at the end of the preceding line, not at the start of the new one. It seems most of the examples everywhere seem to agree with me.
No rustfmt config (eg. all defaults), version 0.3.4-nightly (6714a44 2017-12-23)
.
It's this repository: https://github.com/vorner/thrust.
Metadata
Metadata
Assignees
Labels
No labels