Skip to content

chore: migrate to Rust 2024#1224

Merged
roderickvd merged 5 commits into
developfrom
chore/rust-2024
May 29, 2026
Merged

chore: migrate to Rust 2024#1224
roderickvd merged 5 commits into
developfrom
chore/rust-2024

Conversation

@roderickvd
Copy link
Copy Markdown
Member

No description provided.

Comment on lines 609 to +606
pub unsafe fn unpack(val: usize) -> Self {
*Box::from_raw(val as *mut _)
unsafe { *Box::from_raw(val as *mut _) }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Is this unsafe needed? It's already in an unsafe fn.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caught me by surprise too, although I understand now: https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. Interesting!

Comment thread src/host/wasapi/device.rs
waveformatex_ptr,
Some(&mut closest_match),
);
let hr = unsafe {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure you're about to push the the change removing the unsafe from the fn but I'll tell you anyway.

Copy link
Copy Markdown
Member

@simlay simlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Hope you don't mind the driveby review. I just felt like reading and this was simple enough. You were pushing changes about things I was commenting on so my comments might be out of date already.

@roderickvd
Copy link
Copy Markdown
Member Author

lgtm. Hope you don't mind the driveby review. I just felt like reading and this was simple enough. You were pushing changes about things I was commenting on so my comments might be out of date already.

Absolutely, thanks for reading along!

@roderickvd roderickvd force-pushed the chore/rust-2024 branch 2 times, most recently from c5296d3 to 26966eb Compare May 29, 2026 18:54
@roderickvd roderickvd force-pushed the chore/rust-2024 branch 2 times, most recently from 6cf3590 to 19463a3 Compare May 29, 2026 20:12
@roderickvd roderickvd merged commit c8114b8 into develop May 29, 2026
32 checks passed
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.

2 participants