Skip to content

Commit

Permalink
io -- introduce local to avoid conflicting borrow
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Feb 11, 2014
1 parent 42cd820 commit c9c8049
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libstd/io/net/udp.rs
Expand Up @@ -83,7 +83,8 @@ impl Reader for UdpStream {

impl Writer for UdpStream {
fn write(&mut self, buf: &[u8]) -> IoResult<()> {
self.as_socket(|sock| sock.sendto(buf, self.connectedTo))
let connectedTo = self.connectedTo;
self.as_socket(|sock| sock.sendto(buf, connectedTo))
}
}

Expand Down

0 comments on commit c9c8049

Please sign in to comment.