diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs index 5ea8b72402..4fc039d7c7 100644 --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -1,4 +1,6 @@ -use alloc::{borrow::ToOwned, format, string::String}; +#[cfg(feature = "std")] +use alloc::format; +use alloc::{borrow::ToOwned, string::String}; use core::num::NonZero; use bevy_ecs::{ @@ -1471,7 +1473,8 @@ pub struct ClosingWindow; /// - Only used on iOS. /// /// [`winit::platform::ios::ScreenEdge`]: https://docs.rs/winit/latest/x86_64-apple-darwin/winit/platform/ios/struct.ScreenEdge.html -#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash, Reflect)] +#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "bevy_reflect", derive(Reflect))] #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] pub enum ScreenEdge { #[default]