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

Add SockAddr::set_length #428

Merged
merged 3 commits into from
Apr 11, 2023
Merged

Conversation

Thomasdezeeuw
Copy link
Collaborator

And two cleanups.

@Thomasdezeeuw
Copy link
Collaborator Author

Fixing the Cirrus CI in #430.

@Thomasdezeeuw Thomasdezeeuw mentioned this pull request Apr 10, 2023
Comment on lines +162 to +164
pub unsafe fn set_length(&mut self, length: socklen_t) {
self.len = length;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This puts a libc type in your public API. Did you intend to do that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We already have that in various other places, e.g. the len function also returns socklen_t. So, it's not ideal and I'm aware of the complexities that then come with updating libc and windows-sys, but they're type definitions (not e.g. structs) should they should remain compatible between dependency updates.

@Thomasdezeeuw Thomasdezeeuw merged commit 3deba62 into rust-lang:master Apr 11, 2023
32 of 33 checks passed
@Thomasdezeeuw Thomasdezeeuw deleted the heph-v0.5 branch April 11, 2023 09:08
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.

None yet

2 participants