-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
net: add unix::SocketAddr::as_abstract_name
#7491
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
864419d to
ac04acf
Compare
unix::SocketAddr::as_abstract_name
ADD-SP
left a comment
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.
I have renamed the title to:
net: add
unix::SocketAddr::as_abstract_name
|
Since the current MSRV is 1.70.0, and the
|
ADD-SP
left a comment
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 to me, could you take a look @Darksonn as you are the issue author and may have more context?
This adds a Linux-specific `SocketAddr::as_abstract_name()` based on stdlib `SocketAddrExt` trait (available since Rust 1.70). The current MSRV is already 1.70.0, so this is not a breaking change.
ac04acf to
54a40d3
Compare
lucab
left a comment
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.
(Sorry I forgot to submit this review draft yesterday)
| #[cfg(any(target_os = "linux", target_os = "android"))] | ||
| #[cfg_attr(docsrs, doc(cfg(any(target_os = "linux", target_os = "android"))))] | ||
| pub fn as_abstract_name(&self) -> Option<&[u8]> { | ||
| use std::os::linux::net::SocketAddrExt; |
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.
Note: this trait has been added in Rust 1.70, which is compatible with current MSRV:
Line 11 in 4b96af6
| rust-version = "1.70" |
Darksonn
left a comment
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.
Thank you.

This adds a Linux-specific
SocketAddr::as_abstract_name()based on stdlibSocketAddrExttrait (available since Rust 1.70).The current MSRV is already 1.70.0, so this is not a breaking change.
Closes: #6202