bevy/crates/bevy_window/src
François Mockers bcb5520742
bevy_window: fix compilation without default features (#19870)
# Objective

- bevy_window fails to compile without default features

```
error: cannot find derive macro `Reflect` in this scope
    --> crates/bevy_window/src/window.rs:1474:60
     |
1474 | #[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash, Reflect)]
     |                                                            ^^^^^^^

warning: unused import: `format`
 --> crates/bevy_window/src/window.rs:1:30
  |
1 | use alloc::{borrow::ToOwned, format, string::String};
  |                              ^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `bevy_window` (lib) generated 1 warning
error: could not compile `bevy_window` (lib) due to 1 previous error; 1 warning emitted
```

## Solution

- Fix them

## Testing

`cargo build -p bevy_window --no-default-features --features
bevy_math/libm`
2025-06-30 20:51:52 +00:00
..
event.rs Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
lib.rs Split CursorOptions off of Window (#19668) 2025-06-17 20:20:13 +00:00
monitor.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
raw_handle.rs Fixes #15389, added docs to RawHandleWrapper::_window field (#18832) 2025-04-28 21:44:57 +00:00
system_cursor.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
system.rs Renamed EventWriter::send methods to write. (#17977) 2025-02-23 21:18:52 +00:00
window.rs bevy_window: fix compilation without default features (#19870) 2025-06-30 20:51:52 +00:00