-
Notifications
You must be signed in to change notification settings - Fork 251
Update to Windows-sys v0.59 #579
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
Conversation
@@ -938,9 +938,11 @@ pub(crate) fn unix_sockaddr(path: &Path) -> io::Result<SockAddr> { | |||
} | |||
|
|||
storage.sun_family = crate::sys::AF_UNIX as sa_family_t; | |||
// SAFETY: casting `[u8]` to `[i8]` is safe. | |||
let b = unsafe { &*(bytes as *const [u8] as *const [i8]) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a bit fragile to rely on char being i8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed this comment, will send a pr to change it to char
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, the type itself actually uses i8
, not a type alias: https://docs.rs/windows-sys/latest/windows_sys/Win32/Networking/WinSock/struct.SOCKADDR_UN.html.
This PR is intended as a successor to #545, but I have concerns about not using a range version like I had authored there: #545 (comment) It seems unnecessarily hostile to hard-upgrade when not necessary for users who are already trying to tackle the big migrations the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Cargo's support for range dependencies is not good. I do not recommend attempting to use it. |
@ErichDonGubler I agree with @Darksonn here. In addition I also don't want to support multiple window-sys versions with breaking changes in between, the instability of the latest version is enough of a maintenance burden as it is. |
No description provided.