Skip to content

Commit 6e48562

Browse files
committed
Move SockAddr::unix down
This shouldn't be the first item in the documentation.
1 parent d9ffccc commit 6e48562

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/sockaddr.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ pub struct SockAddr {
2525

2626
#[allow(clippy::len_without_is_empty)]
2727
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-
3828
/// Create a `SockAddr` from the underlying storage and its length.
3929
///
4030
/// # Safety
@@ -153,6 +143,16 @@ impl SockAddr {
153143
})
154144
}
155145

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+
156156
/// Returns this address's family.
157157
pub const fn family(&self) -> sa_family_t {
158158
self.storage.ss_family

0 commit comments

Comments
 (0)