We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried running the https://docs.rs/winit/latest/winit/index.html example as is and keep getting the error message
--> src/main.rs:43:1 | 43 | let event_loop = EventLoop::new().unwrap(); | ^^^ consider using `const` or `static` instead of `let` for global variables
Because of the lines below, it makes no sense for it to be a global variable.
event_loop.set_control_flow(ControlFlow::Poll); event_loop.set_control_flow(ControlFlow::Wait);
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.
Linux Mint 21.3 x11 cinnamon
0.30.5
The text was updated successfully, but these errors were encountered:
put them inside fn main() { /* your code here */ }.
fn main() { /* your code here */ }
Sorry, something went wrong.
fn main
To expand a little bit, the example is using the common rustdoc convention of eliding the main function in examples which Rust otherwise requires.
rustdoc
main
I have been thinking though, perhaps it would make sense to not do that here? Opened #3971 for that.
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: