about summary refs log tree commit diff
path: root/library/std/src/os/unix/net/addr.rs
diff options
context:
space:
mode:
authorThomas de Zeeuw <thomasdezeeuw@gmail.com>2022-02-25 13:03:41 +0100
committerThomas de Zeeuw <thomasdezeeuw@gmail.com>2022-02-25 13:05:49 +0100
commit7f44b3a118a93497b3d60cb161dc71c1d2cb7e72 (patch)
tree494f7103e0b904e4e9225f254ef35befa87155b5 /library/std/src/os/unix/net/addr.rs
parent03c8ffaacb040a8753ef8e1accea701bc9f5be85 (diff)
downloadrust-7f44b3a118a93497b3d60cb161dc71c1d2cb7e72.tar.gz
rust-7f44b3a118a93497b3d60cb161dc71c1d2cb7e72.zip
Rename unix::net::SocketAddr::from_path to from_pathname
Matching SocketAddr::as_pathname.
Diffstat (limited to 'library/std/src/os/unix/net/addr.rs')
-rw-r--r--library/std/src/os/unix/net/addr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/os/unix/net/addr.rs b/library/std/src/os/unix/net/addr.rs
index 034fa301ba1..62bf4b6e862 100644
--- a/library/std/src/os/unix/net/addr.rs
+++ b/library/std/src/os/unix/net/addr.rs
@@ -145,7 +145,7 @@ impl SocketAddr {
     /// use std::path::Path;
     ///
     /// # fn main() -> std::io::Result<()> {
-    /// let address = SocketAddr::from_path("/path/to/socket")?;
+    /// let address = SocketAddr::from_pathname("/path/to/socket")?;
     /// assert_eq!(address.as_pathname(), Some(Path::new("/path/to/socket")));
     /// # Ok(())
     /// # }
@@ -157,10 +157,10 @@ impl SocketAddr {
     /// #![feature(unix_socket_creation)]
     /// use std::os::unix::net::SocketAddr;
     ///
-    /// assert!(SocketAddr::from_path("/path/with/\0/bytes").is_err());
+    /// assert!(SocketAddr::from_pathname("/path/with/\0/bytes").is_err());
     /// ```
     #[unstable(feature = "unix_socket_creation", issue = "93423")]
-    pub fn from_path<P>(path: P) -> io::Result<SocketAddr>
+    pub fn from_pathname<P>(path: P) -> io::Result<SocketAddr>
     where
         P: AsRef<Path>,
     {