mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-31 00:00:07 +02:00
Rename networking constructors with _std
This commit renames the various constructors of networking types to have a `_std` suffix instead of a smorgasboard of other suffixes, canonicalizing on `_std` as the suffix for constructors which take the libstd corresponding types.
This commit is contained in:
+2
-2
@@ -37,8 +37,8 @@ impl UdpSocket {
|
||||
/// This can be used in conjunction with net2's `UdpBuilder` interface to
|
||||
/// configure a socket before it's handed off, such as setting options like
|
||||
/// `reuse_address` or binding to multiple addresses.
|
||||
pub fn from_socket(socket: net::UdpSocket,
|
||||
handle: &Handle) -> io::Result<UdpSocket> {
|
||||
pub fn from_std(socket: net::UdpSocket,
|
||||
handle: &Handle) -> io::Result<UdpSocket> {
|
||||
let udp = try!(mio::net::UdpSocket::from_socket(socket));
|
||||
UdpSocket::new(udp, handle)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user