Skip to content

Commit 9840deb

Browse files
author
Zitro
committed
polishing code
1 parent 63c0e84 commit 9840deb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crates/bevy_winit/src/winit_windows.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,24 +109,25 @@ impl WinitWindows {
109109
#[cfg(feature = "x11")]
110110
let mut winit_window_builder = winit_window_builder.with_class(
111111
window_descriptor.desktop_instance.clone(), // that's actually wm_instance
112-
window_descriptor.desktop_id.clone() // and that's wm_class
112+
window_descriptor.desktop_id.clone(), // and that's wm_class
113113
);
114114
/*
115115
https://github.com/rust-windowing/winit/blob/ea1c031b54438e64576353b288848c07d2068214/src/platform/unix.rs#L337
116116
337| fn with_class(self, class: String, instance: String) -> Self;
117117
https://github.com/rust-windowing/winit/blob/ea1c031b54438e64576353b288848c07d2068214/src/platform/unix.rs#L383
118118
383| fn with_class(mut self, instance: String, class: String) -> Self {
119-
119+
120120
Because of type equality someone wrote those wrong and Rust didn't catch it!
121121
rust-analyser uses only trait declaration, therefore it shows wrong parameter names
122122
123123
This bug persists not only in 0.26.0, but also in 0.26.1
124124
The next update will be breaking, no more differentiation between x11 class and wayland appid
125125
*/
126-
126+
127127
#[allow(unused_mut)]
128128
#[cfg(feature = "wayland")]
129-
let mut winit_window_builder = winit_window_builder.with_app_id(window_descriptor.desktop_id.clone());
129+
let mut winit_window_builder =
130+
winit_window_builder.with_app_id(window_descriptor.desktop_id.clone());
130131

131132
#[cfg(target_arch = "wasm32")]
132133
{

0 commit comments

Comments
 (0)