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 Aug 4, 2024
1 parent 02a0a91 commit 34a37b8
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 @@ -2391,7 +2391,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 34a37b8

Please sign in to comment.