Skip to content

Commit

Permalink
fix unused mut in udp example
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Sep 14, 2020
1 parent 7a43d9c commit b321df3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/echo-udp.rs
Expand Up @@ -26,7 +26,7 @@ struct Server {
impl Server {
async fn run(self) -> Result<(), io::Error> {
let Server {
mut socket,
socket,
mut buf,
mut to_send,
} = self;
Expand Down
2 changes: 1 addition & 1 deletion examples/udp-client.rs
Expand Up @@ -55,7 +55,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
}
.parse()?;

let mut socket = UdpSocket::bind(local_addr).await?;
let socket = UdpSocket::bind(local_addr).await?;
const MAX_DATAGRAM_SIZE: usize = 65_507;
socket.connect(&remote_addr).await?;
let data = get_stdin_data()?;
Expand Down

0 comments on commit b321df3

Please sign in to comment.