From 16c2e0983cc0ab22f9a0b7a1ac37ea32a42b9a6e Mon Sep 17 00:00:00 2001 From: Nylonicious <50183564+nylonicious@users.noreply.github.com> Date: Thu, 10 Dec 2020 20:58:27 +0100 Subject: net: Pass SocketAddr by value (#3125) --- tokio/src/net/udp/socket.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tokio/src') diff --git a/tokio/src/net/udp/socket.rs b/tokio/src/net/udp/socket.rs index a9c5c868..3775714c 100644 --- a/tokio/src/net/udp/socket.rs +++ b/tokio/src/net/udp/socket.rs @@ -745,11 +745,11 @@ impl UdpSocket { &self, cx: &mut Context<'_>, buf: &[u8], - target: &SocketAddr, + target: SocketAddr, ) -> Poll> { self.io .registration() - .poll_write_io(cx, || self.io.send_to(buf, *target)) + .poll_write_io(cx, || self.io.send_to(buf, target)) } /// Try to send data on the socket to the given address, but if the send is -- cgit v1.2.3