File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,6 @@ pub struct SockAddr {
25
25
26
26
#[ allow( clippy:: len_without_is_empty) ]
27
27
impl SockAddr {
28
- /// Constructs a `SockAddr` with the family `AF_UNIX` and the provided path.
29
- ///
30
- /// Returns an error if the path is longer than `SUN_LEN`.
31
- pub fn unix < P > ( path : P ) -> io:: Result < SockAddr >
32
- where
33
- P : AsRef < Path > ,
34
- {
35
- crate :: sys:: unix_sockaddr ( path. as_ref ( ) )
36
- }
37
-
38
28
/// Create a `SockAddr` from the underlying storage and its length.
39
29
///
40
30
/// # Safety
@@ -153,6 +143,16 @@ impl SockAddr {
153
143
} )
154
144
}
155
145
146
+ /// Constructs a `SockAddr` with the family `AF_UNIX` and the provided path.
147
+ ///
148
+ /// Returns an error if the path is longer than `SUN_LEN`.
149
+ pub fn unix < P > ( path : P ) -> io:: Result < SockAddr >
150
+ where
151
+ P : AsRef < Path > ,
152
+ {
153
+ crate :: sys:: unix_sockaddr ( path. as_ref ( ) )
154
+ }
155
+
156
156
/// Returns this address's family.
157
157
pub const fn family ( & self ) -> sa_family_t {
158
158
self . storage . ss_family
You can’t perform that action at this time.
0 commit comments