diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..39b9995 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,2 @@ +fn_args_layout = "Compressed" +use_field_init_shorthand = true diff --git a/src/win/window.rs b/src/win/window.rs index 95de2f0..81a9439 100644 --- a/src/win/window.rs +++ b/src/win/window.rs @@ -58,10 +58,7 @@ unsafe fn handle_timer(window_state: &RefCell>, } unsafe extern "system" fn wnd_proc( - hwnd: HWND, - msg: UINT, - wparam: WPARAM, - lparam: LPARAM, + hwnd: HWND, msg: UINT, wparam: WPARAM, lparam: LPARAM, ) -> LRESULT { if msg == WM_CREATE { PostMessageA(hwnd, WM_SHOWWINDOW, 0, 0); diff --git a/src/x11/window.rs b/src/x11/window.rs index 6722bcf..ff29ab4 100644 --- a/src/x11/window.rs +++ b/src/x11/window.rs @@ -51,8 +51,7 @@ impl Window { } fn window_thread( - options: WindowOpenOptions, - tx: mpsc::SyncSender, + options: WindowOpenOptions, tx: mpsc::SyncSender, ) -> WindowOpenResult { // Connect to the X server // FIXME: baseview error type instead of unwrap() @@ -122,9 +121,7 @@ impl Window { title.as_bytes(), ); - xcb_connection - .atoms - .wm_protocols + xcb_connection.atoms.wm_protocols .zip(xcb_connection.atoms.wm_delete_window) .map(|(wm_protocols, wm_delete_window)| { xcb_util::icccm::set_wm_protocols( @@ -254,10 +251,7 @@ impl Window { let data = event.data().data; let (_, data32, _) = unsafe { data.align_to::() }; - let wm_delete_window = self - .xcb_connection - .atoms - .wm_delete_window + let wm_delete_window = self.xcb_connection.atoms.wm_delete_window .unwrap_or(xcb::NONE); if wm_delete_window == data32[0] {