From 8de1d5718d2cc1d196b708540fc59706e3720977 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Wed, 16 Sep 2020 08:40:27 +0200 Subject: [PATCH] Rustfmt --- examples/char_callback.rs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/examples/char_callback.rs b/examples/char_callback.rs index 83a82bb..bc5f06f 100644 --- a/examples/char_callback.rs +++ b/examples/char_callback.rs @@ -8,7 +8,7 @@ const HEIGHT: usize = 360; type KeyVec = Rc>>; struct Input { -keys: KeyVec, + keys: KeyVec, } impl Input { @@ -27,14 +27,14 @@ fn main() { let mut buffer: Vec = vec![0; WIDTH * HEIGHT]; let mut window = Window::new( - "Test - ESC to exit", - WIDTH, - HEIGHT, - WindowOptions::default(), - ) - .unwrap_or_else(|e| { - panic!("{}", e); - }); + "Test - ESC to exit", + WIDTH, + HEIGHT, + WindowOptions::default(), + ) + .unwrap_or_else(|e| { + panic!("{}", e); + }); let keys_data = KeyVec::new(RefCell::new(Vec::new())); @@ -50,9 +50,7 @@ fn main() { } // We unwrap here as we want this code to exit if it fails. Real applications may want to handle this in a different way - window - .update_with_buffer(&buffer, WIDTH, HEIGHT) - .unwrap(); + window.update_with_buffer(&buffer, WIDTH, HEIGHT).unwrap(); let mut keys = keys_data.borrow_mut();