mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
Update send_dgram function signature. (#91)
* Update send_dgram function signature. All other fns take `&SocketAddr`. * Fix tests
This commit is contained in:
committed by
Alex Crichton
parent
117dcba8cb
commit
0f4706d752
+2
-2
@@ -184,10 +184,10 @@ impl UdpSocket {
|
||||
/// The `buf` parameter here only requires the `AsRef<[u8]>` trait, which
|
||||
/// should be broadly applicable to accepting data which can be converted
|
||||
/// to a slice.
|
||||
pub fn send_dgram<T>(self, buf: T, addr: SocketAddr) -> SendDgram<T>
|
||||
pub fn send_dgram<T>(self, buf: T, addr: &SocketAddr) -> SendDgram<T>
|
||||
where T: AsRef<[u8]>,
|
||||
{
|
||||
SendDgram::new(self, buf, addr)
|
||||
SendDgram::new(self, buf, *addr)
|
||||
}
|
||||
|
||||
/// Receives data from the socket. On success, returns the number of bytes
|
||||
|
||||
Reference in New Issue
Block a user