Rustfmt: use group_imports

This commit is contained in:
daxpedda 2024-07-07 18:38:50 +02:00
parent 936da131c2
commit 2665c12098
No known key found for this signature in database
GPG key ID: 43D62A3EA388E46F
86 changed files with 225 additions and 276 deletions

View file

@ -12,6 +12,10 @@ use orbclient::{
};
use smol_str::SmolStr;
use super::{
DeviceId, KeyEventExtra, MonitorHandle, OsError, PlatformSpecificEventLoopAttributes,
RedoxSocket, TimeSocket, WindowId, WindowProperties,
};
use crate::application::ApplicationHandler;
use crate::error::EventLoopError;
use crate::event::{self, Ime, Modifiers, StartCause};
@ -24,11 +28,6 @@ use crate::window::{
CustomCursor as RootCustomCursor, CustomCursorSource, WindowId as RootWindowId,
};
use super::{
DeviceId, KeyEventExtra, MonitorHandle, OsError, PlatformSpecificEventLoopAttributes,
RedoxSocket, TimeSocket, WindowId, WindowProperties,
};
fn convert_scancode(scancode: u8) -> (PhysicalKey, Option<NamedKey>) {
// Key constants from https://docs.rs/orbclient/latest/orbclient/event/index.html
let (key_code, named_key_opt) = match scancode {

View file

@ -6,10 +6,9 @@ use std::sync::Arc;
use smol_str::SmolStr;
pub(crate) use self::event_loop::{ActiveEventLoop, EventLoop, EventLoopProxy, OwnedDisplayHandle};
use crate::dpi::{PhysicalPosition, PhysicalSize};
use crate::keyboard::Key;
pub(crate) use self::event_loop::{ActiveEventLoop, EventLoop, EventLoopProxy, OwnedDisplayHandle};
mod event_loop;
pub use self::window::Window;

View file

@ -1,16 +1,15 @@
use std::collections::VecDeque;
use std::sync::{Arc, Mutex};
use super::{
ActiveEventLoop, MonitorHandle, OsError, RedoxSocket, TimeSocket, WindowId, WindowProperties,
};
use crate::cursor::Cursor;
use crate::dpi::{PhysicalPosition, PhysicalSize, Position, Size};
use crate::platform_impl::Fullscreen;
use crate::window::ImePurpose;
use crate::{error, window};
use super::{
ActiveEventLoop, MonitorHandle, OsError, RedoxSocket, TimeSocket, WindowId, WindowProperties,
};
// These values match the values uses in the `window_new` function in orbital:
// https://gitlab.redox-os.org/redox-os/orbital/-/blob/master/src/scheme.rs
const ORBITAL_FLAG_ASYNC: char = 'a';