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

@ -9,8 +9,7 @@ mod pointer;
mod resize_scaling;
mod schedule;
pub use self::canvas::Canvas;
pub use self::canvas::Style;
pub use self::canvas::{Canvas, Style};
pub use self::event::ButtonsState;
pub use self::event_handle::EventListenerHandle;
pub use self::resize_scaling::ResizeScaleHandle;
@ -40,10 +39,7 @@ pub fn on_page_transition(
let show_listener =
event_handle::EventListenerHandle::new(window.clone(), "pageshow", show_closure);
let hide_listener = event_handle::EventListenerHandle::new(window, "pagehide", hide_closure);
PageTransitionEventHandle {
_show_listener: show_listener,
_hide_listener: hide_listener,
}
PageTransitionEventHandle { _show_listener: show_listener, _hide_listener: hide_listener }
}
pub fn scale_factor(window: &web_sys::Window) -> f64 {
@ -154,11 +150,7 @@ pub fn style_size_property(style: &Style, property: &str) -> f64 {
}
pub fn is_dark_mode(window: &web_sys::Window) -> Option<bool> {
window
.match_media("(prefers-color-scheme: dark)")
.ok()
.flatten()
.map(|media| media.matches())
window.match_media("(prefers-color-scheme: dark)").ok().flatten().map(|media| media.matches())
}
pub fn is_visible(document: &Document) -> bool {