Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
not-fl3 committed Aug 25, 2024
1 parent 6eee711 commit a5c9e57
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/native/linux_x11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mod xi_input;

use crate::{
event::EventHandler,
native::{egl, gl, NativeDisplayData, Request, module},
native::{egl, gl, module, NativeDisplayData, Request},
CursorIcon,
};

Expand Down
8 changes: 6 additions & 2 deletions src/native/linux_x11/glx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/native/linux_x11/xi_input.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/native/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a5c9e57

Please sign in to comment.