-
-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
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
Can not borrow window in for loop #641
Comments
This is a bug in Rust and not in Piston. In the mean time, we'll use loop {
let e = match event_iter.next() {
None => { break; }
Some(e) => e
};
// Handle event here.
} |
Isn't it also a problem that EventIterator borrows window mutably basically preventing you from using window anyway? |
This code used to compile, how did it work before? Is the breakage related to this bug? |
@TyOverby Use |
Thanks Sven! On Thu, Sep 18, 2014 at 11:20 PM, Sven Nilsen notifications@github.com
-Ty Overby |
This only affects events loops that uses the window.
A breaking change in Rust borrows the iterator for the whole for loop:
rust-lang/rust#17101
Also, see rust-lang/rust#8372
The text was updated successfully, but these errors were encountered: