Closed code-Cells closed 4 weeks ago
put them inside fn main() { /* your code here */ }
.
To expand a little bit, the example is using the common rustdoc
convention of eliding the main
function in examples which Rust otherwise requires.
I have been thinking though, perhaps it would make sense to not do that here? Opened https://github.com/rust-windowing/winit/pull/3971 for that.
Description
I tried running the https://docs.rs/winit/latest/winit/index.html example as is and keep getting the error message
Because of the lines below, it makes no sense for it to be a global variable.
Took some time researching, but didn't manage to fiend an issue about this. Is this a known one?
Also tried 0.30.1, and got the same problem.
OS and window mananger
Linux Mint 21.3 x11 cinnamon
Winit version
0.30.5