Skip to content

Add SockAddr::set_length#428

Merged
Thomasdezeeuw merged 3 commits intorust-lang:masterfrom
Thomasdezeeuw:heph-v0.5
Apr 11, 2023
Merged

Add SockAddr::set_length#428
Thomasdezeeuw merged 3 commits intorust-lang:masterfrom
Thomasdezeeuw:heph-v0.5

Conversation

@Thomasdezeeuw
Copy link
Collaborator

And two cleanups.

@Thomasdezeeuw Thomasdezeeuw requested a review from Darksonn April 10, 2023 14:00
@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
Member

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
@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.

2 participants