Skip to content

Commit 7f44b3a

Browse files
committed
Rename unix::net::SocketAddr::from_path to from_pathname
Matching SocketAddr::as_pathname.
1 parent 03c8ffa commit 7f44b3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/std/src/os/unix/net/addr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl SocketAddr {
145145
/// use std::path::Path;
146146
///
147147
/// # fn main() -> std::io::Result<()> {
148-
/// let address = SocketAddr::from_path("/path/to/socket")?;
148+
/// let address = SocketAddr::from_pathname("/path/to/socket")?;
149149
/// assert_eq!(address.as_pathname(), Some(Path::new("/path/to/socket")));
150150
/// # Ok(())
151151
/// # }
@@ -157,10 +157,10 @@ impl SocketAddr {
157157
/// #![feature(unix_socket_creation)]
158158
/// use std::os::unix::net::SocketAddr;
159159
///
160-
/// assert!(SocketAddr::from_path("/path/with/\0/bytes").is_err());
160+
/// assert!(SocketAddr::from_pathname("/path/with/\0/bytes").is_err());
161161
/// ```
162162
#[unstable(feature = "unix_socket_creation", issue = "93423")]
163-
pub fn from_path<P>(path: P) -> io::Result<SocketAddr>
163+
pub fn from_pathname<P>(path: P) -> io::Result<SocketAddr>
164164
where
165165
P: AsRef<Path>,
166166
{

0 commit comments

Comments
 (0)