Skip to content
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

Update to Rust 1.54 #580

Merged
merged 4 commits into from
Aug 5, 2021
Merged

Update to Rust 1.54 #580

merged 4 commits into from
Aug 5, 2021

Conversation

iceiix
Copy link
Owner

@iceiix iceiix commented Aug 1, 2021

No description provided.

@iceiix
Copy link
Owner Author

iceiix commented Aug 1, 2021

Fixed the clippy::needless_borrow, but now the wasm build fails:

error[E0308]: mismatched types
432
   --> src/main.rs:512:33
433
    |
434
512 |         if !handle_window_event(winit_window, &mut game, &mut ui_container, event) {
435
    |                                 ^^^^^^^^^^^^
436
    |                                 |
437
    |                                 expected `&winit::window::Window`, found struct `std::cell::RefMut`
438
    |                                 help: consider borrowing here: `&winit_window`
439
    |
440
    = note: expected reference `&winit::window::Window`
441
                  found struct `std::cell::RefMut<'_, winit::window::Window>`

The difference seems to be:

        #[cfg(target_arch = "wasm32")]
        let winit_window = winit_window.borrow_mut();

        #[cfg(not(target_arch = "wasm32"))]
        let winit_window = glutin_window.window();

@iceiix iceiix merged commit 1a9e8d4 into master Aug 5, 2021
@iceiix iceiix deleted the rust1.54 branch August 5, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant