mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
net: rename the argument for send_to
(#7146)
This commit is contained in:
parent
8713d39228
commit
eb1a2ee990
@ -1164,8 +1164,8 @@ impl UdpSocket {
|
||||
/// Ok(())
|
||||
/// }
|
||||
/// ```
|
||||
pub async fn send_to<A: ToSocketAddrs>(&self, buf: &[u8], target: A) -> io::Result<usize> {
|
||||
let mut addrs = to_socket_addrs(target).await?;
|
||||
pub async fn send_to<A: ToSocketAddrs>(&self, buf: &[u8], addr: A) -> io::Result<usize> {
|
||||
let mut addrs = to_socket_addrs(addr).await?;
|
||||
|
||||
match addrs.next() {
|
||||
Some(target) => self.send_to_addr(buf, target).await,
|
||||
|
Loading…
x
Reference in New Issue
Block a user