mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-16 10:49:55 +00:00
fix documentation issue
This commit is contained in:
parent
33ba7f7e13
commit
a81f7b67f7
1 changed files with 2 additions and 3 deletions
|
@ -21,7 +21,7 @@ pub trait ToSocketAddrs {
|
||||||
/// The returned iterator may not actually yield any values depending on the
|
/// The returned iterator may not actually yield any values depending on the
|
||||||
/// outcome of any resolution performed.
|
/// outcome of any resolution performed.
|
||||||
///
|
///
|
||||||
/// Note that this function may block the current thread while resolution is
|
/// Note that this function may block a backend thread while resolution is
|
||||||
/// performed.
|
/// performed.
|
||||||
fn to_socket_addrs(&self) -> Self::Output;
|
fn to_socket_addrs(&self) -> Self::Output;
|
||||||
}
|
}
|
||||||
|
@ -132,9 +132,8 @@ impl ToSocketAddrs for String {
|
||||||
|
|
||||||
#[cfg(all(test, not(target_os = "emscripten")))]
|
#[cfg(all(test, not(target_os = "emscripten")))]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6};
|
|
||||||
|
|
||||||
use crate::net::*;
|
use crate::net::*;
|
||||||
|
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
|
||||||
|
|
||||||
fn tsa<A: ToSocketAddrs>(a: A) -> Result<Vec<SocketAddr>, String> {
|
fn tsa<A: ToSocketAddrs>(a: A) -> Result<Vec<SocketAddr>, String> {
|
||||||
let socket_addrs = crate::task::block_on(a.to_socket_addrs());
|
let socket_addrs = crate::task::block_on(a.to_socket_addrs());
|
||||||
|
|
Loading…
Reference in a new issue