Skip to content

Commit

Permalink
Windows: use Box::leak() instead of Box::into_raw()
Browse files Browse the repository at this point in the history
This was detected by a new change in Nightly Rust that applied
`#[must_use]` to the return value of `Box::into_raw()`.
  • Loading branch information
daxpedda authored and kchibisov committed Aug 8, 2024
1 parent 5fce4a0 commit 77e8fe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform_impl/windows/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2441,7 +2441,7 @@ unsafe extern "system" fn thread_event_target_callback(
if userdata_removed {
drop(userdata);
} else {
Box::into_raw(userdata);
Box::leak(userdata);
}
result
}
Expand Down

0 comments on commit 77e8fe6

Please sign in to comment.