chore(rustfmt): use nightly (#2325)

Stable rustfmt lacks a lot of features resulting in worse formatted
code, thus use nightly formatter.
This commit is contained in:
Kirill Chibisov 2024-04-26 19:11:44 +04:00 committed by GitHub
parent 7006c7ceca
commit 7b0c7b6cb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
154 changed files with 3439 additions and 5891 deletions

View file

@ -6,10 +6,8 @@ use std::sync::Arc;
use smol_str::SmolStr;
use crate::{
dpi::{PhysicalPosition, PhysicalSize},
keyboard::Key,
};
use crate::dpi::{PhysicalPosition, PhysicalSize};
use crate::keyboard::Key;
pub(crate) use self::event_loop::{ActiveEventLoop, EventLoop, EventLoopProxy, OwnedDisplayHandle};
mod event_loop;
@ -105,9 +103,7 @@ pub struct WindowId {
impl WindowId {
pub const fn dummy() -> Self {
WindowId {
fd: u64::max_value(),
}
WindowId { fd: u64::max_value() }
}
}
@ -149,27 +145,12 @@ impl<'a> WindowProperties<'a> {
// orbital:flags/x/y/w/h/t
let mut parts = path.splitn(6, '/');
let flags = parts.next().unwrap_or("");
let x = parts
.next()
.map_or(0, |part| part.parse::<i32>().unwrap_or(0));
let y = parts
.next()
.map_or(0, |part| part.parse::<i32>().unwrap_or(0));
let w = parts
.next()
.map_or(0, |part| part.parse::<u32>().unwrap_or(0));
let h = parts
.next()
.map_or(0, |part| part.parse::<u32>().unwrap_or(0));
let x = parts.next().map_or(0, |part| part.parse::<i32>().unwrap_or(0));
let y = parts.next().map_or(0, |part| part.parse::<i32>().unwrap_or(0));
let w = parts.next().map_or(0, |part| part.parse::<u32>().unwrap_or(0));
let h = parts.next().map_or(0, |part| part.parse::<u32>().unwrap_or(0));
let title = parts.next().unwrap_or("");
Self {
flags,
x,
y,
w,
h,
title,
}
Self { flags, x, y, w, h, title }
}
}
@ -198,8 +179,9 @@ impl Display for OsError {
}
}
pub(crate) use crate::cursor::NoCustomCursor as PlatformCustomCursor;
pub(crate) use crate::cursor::NoCustomCursor as PlatformCustomCursorSource;
pub(crate) use crate::cursor::{
NoCustomCursor as PlatformCustomCursor, NoCustomCursor as PlatformCustomCursorSource,
};
pub(crate) use crate::icon::NoIcon as PlatformIcon;
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]