-
Notifications
You must be signed in to change notification settings - Fork 739
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
Remove TcpSocket type #1514
Remove TcpSocket type #1514
Conversation
The socket2 crate provide all the functionality and more. Furthermore supporting all socket options is beyond the scope of Mio. The easier migration is to the socket2 crate, using the Socket or SockRef types. The migration for Tokio is tracked in tokio-rs/tokio#4135.
pub const POLL_RECEIVE: u32 = 0b000_000_001; | ||
pub const POLL_RECEIVE_EXPEDITED: u32 = 0b000_000_010; | ||
pub const POLL_SEND: u32 = 0b000_000_100; | ||
pub const POLL_DISCONNECT: u32 = 0b000_001_000; | ||
pub const POLL_ABORT: u32 = 0b000_010_000; | ||
pub const POLL_LOCAL_CLOSE: u32 = 0b000_100_000; | ||
pub const POLL_RECEIVE: u32 = 0b0_0000_0001; | ||
pub const POLL_RECEIVE_EXPEDITED: u32 = 0b0_0000_0010; | ||
pub const POLL_SEND: u32 = 0b0_0000_0100; | ||
pub const POLL_DISCONNECT: u32 = 0b0_0000_1000; | ||
pub const POLL_ABORT: u32 = 0b0_0001_0000; | ||
pub const POLL_LOCAL_CLOSE: u32 = 0b0_0010_0000; |
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.
Was this some sort of change by rustfmt?
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.
This was a Clippy warnings on Windows, which we don't check on the CI.
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.
The change doesn't bother me — it just seemed like the old grouping was intentional.
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.
It seems I change it to bit patterns in commit 800b786 and just miscounted or something. I don't remember any intention behind it.
c10f861
to
b20a86d
Compare
Seems this isn't check on the CI.
b20a86d
to
943cbb6
Compare
Ugh.. now bitflags broke the MSRV in cargo-hacks... I'll change the install of cargo-hack to use nightly or something. |
Related nix-rust/nix#1548 and bitflags/bitflags#255. |
Cargo-hack's (transient) dependency bitflags has updated its MSRV.
@Darksonn sorry for the noise but the CI is finally green. |
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 fine to me.
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.
Looks good!
The socket2 crate provide all the functionality and more. Furthermore
supporting all socket options is beyond the scope of Mio.
The easier migration is to the socket2 crate, using the Socket or
SockRef types.
The migration for Tokio is tracked in
tokio-rs/tokio#4135.