Skip to content

Commit

Permalink
Don't drop Copy type in example
Browse files Browse the repository at this point in the history
Assign it to _ to silence the unused variable warning.
  • Loading branch information
Thomasdezeeuw committed May 27, 2023
1 parent 0757ec8 commit 958200c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ use std::os::windows::io::{AsRawSocket, FromRawSocket, IntoRawSocket, RawSocket}
/// let num_recv = echoer_socket.recv(&mut buffer)?;
/// println!("echo {:?} -> {:?}", buffer, num_recv);
/// buffer = [0; 9];
/// # drop(buffer); // Silence unused assignment warning.
/// # _ = buffer; // Silence unused assignment warning.
/// # return Ok(());
/// }
/// _ => unreachable!()
Expand Down

0 comments on commit 958200c

Please sign in to comment.