From a5c9e579efeabca50bd9dbc296d482cee0f7bb37 Mon Sep 17 00:00:00 2001 From: Fedor Logachev Date: Sat, 24 Aug 2024 20:15:52 -0600 Subject: [PATCH] cargo fmt --- src/native/linux_x11.rs | 2 +- src/native/linux_x11/glx.rs | 8 ++++++-- src/native/linux_x11/xi_input.rs | 2 +- src/native/macos.rs | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/native/linux_x11.rs b/src/native/linux_x11.rs index 03bf5b84..4058018c 100644 --- a/src/native/linux_x11.rs +++ b/src/native/linux_x11.rs @@ -10,7 +10,7 @@ mod xi_input; use crate::{ event::EventHandler, - native::{egl, gl, NativeDisplayData, Request, module}, + native::{egl, gl, module, NativeDisplayData, Request}, CursorIcon, }; diff --git a/src/native/linux_x11/glx.rs b/src/native/linux_x11/glx.rs index 0a6438c3..07540d41 100644 --- a/src/native/linux_x11/glx.rs +++ b/src/native/linux_x11/glx.rs @@ -230,10 +230,14 @@ impl Glx { let mut glx_minor = 0; if (libgl.glxQueryVersion.unwrap())(display, &mut glx_major, &mut glx_minor) == 0 { - return Err(X11Error::GLXError("Failed to query GLX version".to_string())); + return Err(X11Error::GLXError( + "Failed to query GLX version".to_string(), + )); } if glx_major == 1 && glx_minor < 3 { - return Err(X11Error::GLXError("GLX version 1.3 is required".to_string())); + return Err(X11Error::GLXError( + "GLX version 1.3 is required".to_string(), + )); } let exts = (libgl.glxQueryExtensionsString.unwrap())(display, screen); diff --git a/src/native/linux_x11/xi_input.rs b/src/native/linux_x11/xi_input.rs index 92060cf9..85d392e5 100644 --- a/src/native/linux_x11/xi_input.rs +++ b/src/native/linux_x11/xi_input.rs @@ -1,10 +1,10 @@ #![allow(non_upper_case_globals, non_snake_case)] -use crate::native::module; use super::{ libx11::{self, Display, Window, _XPrivDisplay}, xi_input, }; +use crate::native::module; pub const XIAllDevices: libc::c_int = 0 as libc::c_int; pub const XI_RawMotion: libc::c_int = 17 as libc::c_int; diff --git a/src/native/macos.rs b/src/native/macos.rs index e93984b3..7865c885 100644 --- a/src/native/macos.rs +++ b/src/native/macos.rs @@ -722,7 +722,6 @@ pub fn define_opengl_view_class() -> *const Class { } } - let superclass = class!(NSView); let mut decl: ClassDecl = ClassDecl::new("RenderViewClass", superclass).unwrap(); unsafe {