We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7f3621 commit da6142cCopy full SHA for da6142c
src/libstd/sys/unix/ext/net.rs
@@ -214,7 +214,10 @@ impl SocketAddr {
214
let path = unsafe { mem::transmute::<&[libc::c_char], &[u8]>(&self.addr.sun_path) };
215
216
// macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses
217
- if len == 0 || (cfg!(not(any(target_os = "linux", target_os = "android"))) && self.addr.sun_path[0] == 0) {
+ if len == 0
218
+ || (cfg!(not(any(target_os = "linux", target_os = "android")))
219
+ && self.addr.sun_path[0] == 0)
220
+ {
221
AddressKind::Unnamed
222
} else if self.addr.sun_path[0] == 0 {
223
AddressKind::Abstract(&path[1..len])
0 commit comments