mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 06:10:07 -04:00
Fix nightly CI
This commit is contained in:
committed by
Kirill Chibisov
parent
454dc56a6e
commit
d2acea95cc
@@ -28,7 +28,7 @@ mod platform {
|
|||||||
// ManuallyDrop to prevent destructors from running.
|
// ManuallyDrop to prevent destructors from running.
|
||||||
//
|
//
|
||||||
// A static, thread-local map of graphics contexts to open windows.
|
// A static, thread-local map of graphics contexts to open windows.
|
||||||
static GC: ManuallyDrop<RefCell<Option<GraphicsContext>>> = ManuallyDrop::new(RefCell::new(None));
|
static GC: ManuallyDrop<RefCell<Option<GraphicsContext>>> = const { ManuallyDrop::new(RefCell::new(None)) };
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The graphics context used to draw to a window.
|
/// The graphics context used to draw to a window.
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
// incoming events (from the registered handlers) and ensuring they are passed to the user in a
|
// incoming events (from the registered handlers) and ensuring they are passed to the user in a
|
||||||
// compliant way.
|
// compliant way.
|
||||||
|
|
||||||
|
// TODO: FP, remove when <https://github.com/rust-lang/rust/issues/121621> is fixed.
|
||||||
|
#![allow(unknown_lints, non_local_definitions)]
|
||||||
|
|
||||||
mod r#async;
|
mod r#async;
|
||||||
mod device;
|
mod device;
|
||||||
mod error;
|
mod error;
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ pub fn pointer_move_event(event: PointerEvent) -> impl Iterator<Item = PointerEv
|
|||||||
// See <https://github.com/rust-windowing/winit/issues/2875>.
|
// See <https://github.com/rust-windowing/winit/issues/2875>.
|
||||||
pub fn has_pointer_raw_support(window: &web_sys::Window) -> bool {
|
pub fn has_pointer_raw_support(window: &web_sys::Window) -> bool {
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static POINTER_RAW_SUPPORT: OnceCell<bool> = OnceCell::new();
|
static POINTER_RAW_SUPPORT: OnceCell<bool> = const { OnceCell::new() };
|
||||||
}
|
}
|
||||||
|
|
||||||
POINTER_RAW_SUPPORT.with(|support| {
|
POINTER_RAW_SUPPORT.with(|support| {
|
||||||
@@ -279,7 +279,7 @@ pub fn has_pointer_raw_support(window: &web_sys::Window) -> bool {
|
|||||||
// See <https://bugs.webkit.org/show_bug.cgi?id=210454>.
|
// See <https://bugs.webkit.org/show_bug.cgi?id=210454>.
|
||||||
pub fn has_coalesced_events_support(event: &PointerEvent) -> bool {
|
pub fn has_coalesced_events_support(event: &PointerEvent) -> bool {
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static COALESCED_EVENTS_SUPPORT: OnceCell<bool> = OnceCell::new();
|
static COALESCED_EVENTS_SUPPORT: OnceCell<bool> = const { OnceCell::new() };
|
||||||
}
|
}
|
||||||
|
|
||||||
COALESCED_EVENTS_SUPPORT.with(|support| {
|
COALESCED_EVENTS_SUPPORT.with(|support| {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ use web_sys::{Document, Element, HtmlCanvasElement};
|
|||||||
use super::EventListenerHandle;
|
use super::EventListenerHandle;
|
||||||
|
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static FULLSCREEN_API_SUPPORT: OnceCell<bool> = OnceCell::new();
|
static FULLSCREEN_API_SUPPORT: OnceCell<bool> = const { OnceCell::new() };
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct FullscreenHandler {
|
pub struct FullscreenHandler {
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ fn duration_millis_ceil(duration: Duration) -> u32 {
|
|||||||
|
|
||||||
fn has_scheduler_support(window: &web_sys::Window) -> bool {
|
fn has_scheduler_support(window: &web_sys::Window) -> bool {
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static SCHEDULER_SUPPORT: OnceCell<bool> = OnceCell::new();
|
static SCHEDULER_SUPPORT: OnceCell<bool> = const { OnceCell::new() };
|
||||||
}
|
}
|
||||||
|
|
||||||
SCHEDULER_SUPPORT.with(|support| {
|
SCHEDULER_SUPPORT.with(|support| {
|
||||||
@@ -221,7 +221,7 @@ fn has_scheduler_support(window: &web_sys::Window) -> bool {
|
|||||||
|
|
||||||
fn has_idle_callback_support(window: &web_sys::Window) -> bool {
|
fn has_idle_callback_support(window: &web_sys::Window) -> bool {
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static IDLE_CALLBACK_SUPPORT: OnceCell<bool> = OnceCell::new();
|
static IDLE_CALLBACK_SUPPORT: OnceCell<bool> = const { OnceCell::new() };
|
||||||
}
|
}
|
||||||
|
|
||||||
IDLE_CALLBACK_SUPPORT.with(|support| {
|
IDLE_CALLBACK_SUPPORT.with(|support| {
|
||||||
|
|||||||
Reference in New Issue
Block a user