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

fix: fix clippy warnings for 1.79 #1139

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

wyfo
Copy link

@wyfo wyfo commented Jun 13, 2024

@wyfo
Copy link
Author

wyfo commented Jun 13, 2024

I'm honestly worried about having so much transmute in the code (I've replaced a few of them), but for now, I just obeyed to the warning.

As the problematic transmute are about lifetime, particularly for mutable reference writes, you may be interested in https://doc.rust-lang.org/src/std/io/impls.rs.html#362-399 or https://github.com/tokio-rs/bytes/blob/fa1daac3ae1dcb07dffe3a41a041dffd6edf177b/src/buf/buf_mut.rs#L1493. I didn't try to modify this unsafe code myself in this PR.

@Mallets
Copy link
Member

Mallets commented Jun 13, 2024

I'm honestly worried about having so much transmute in the code (I've replaced a few of them), but for now, I just obeyed to the warning.

As the problematic transmute are about lifetime, particularly for mutable reference writes, you may be interested in https://doc.rust-lang.org/src/std/io/impls.rs.html#362-399 or https://github.com/tokio-rs/bytes/blob/fa1daac3ae1dcb07dffe3a41a041dffd6edf177b/src/buf/buf_mut.rs#L1493. I didn't try to modify this unsafe code myself in this PR.

Interesting, it is definitely worth a try.

@Mallets Mallets merged commit 02fc4a8 into eclipse-zenoh:dev/1.0.0 Jun 13, 2024
9 checks passed
@Mallets Mallets deleted the fix_1.79 branch June 13, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants