File tree 1 file changed +4
-6
lines changed
library/std/src/os/unix/net
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -140,12 +140,11 @@ impl SocketAddr {
140
140
/// # Examples
141
141
///
142
142
/// ```
143
- /// #![feature(unix_socket_creation)]
144
143
/// use std::os::unix::net::SocketAddr;
145
144
/// use std::path::Path;
146
145
///
147
146
/// # fn main() -> std::io::Result<()> {
148
- /// let address = SocketAddr::from_path ("/path/to/socket")?;
147
+ /// let address = SocketAddr::from_pathname ("/path/to/socket")?;
149
148
/// assert_eq!(address.as_pathname(), Some(Path::new("/path/to/socket")));
150
149
/// # Ok(())
151
150
/// # }
@@ -154,13 +153,12 @@ impl SocketAddr {
154
153
/// Creating a `SocketAddr` with a NULL byte results in an error.
155
154
///
156
155
/// ```
157
- /// #![feature(unix_socket_creation)]
158
156
/// use std::os::unix::net::SocketAddr;
159
157
///
160
- /// assert!(SocketAddr::from_path ("/path/with/\0/bytes").is_err());
158
+ /// assert!(SocketAddr::from_pathname ("/path/with/\0/bytes").is_err());
161
159
/// ```
162
- #[ unstable ( feature = "unix_socket_creation" , issue = "93423 " ) ]
163
- pub fn from_path < P > ( path : P ) -> io:: Result < SocketAddr >
160
+ #[ stable ( feature = "unix_socket_creation" , since = "1.61.0 " ) ]
161
+ pub fn from_pathname < P > ( path : P ) -> io:: Result < SocketAddr >
164
162
where
165
163
P : AsRef < Path > ,
166
164
{
You can’t perform that action at this time.
0 commit comments