diff --git a/examples/master_querant.rs b/examples/master_querant.rs index 901e973..05b995e 100644 --- a/examples/master_querant.rs +++ b/examples/master_querant.rs @@ -88,7 +88,7 @@ fn main() -> GDResult<()> { } true => Some(args[3].parse::().expect("Invalid port!")), }; - let address = &SocketAddr::new(ip.clone(), port.unwrap_or(0)); + let address = &SocketAddr::new(*ip, port.unwrap_or(0)); match args[1].as_str() { "aliens" => println!("{:#?}", aliens::query(ip, port)?), diff --git a/src/socket.rs b/src/socket.rs index a18c23f..37aa035 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -109,8 +109,8 @@ mod tests { let server_thread = thread::spawn(move || { let (mut stream, _) = listener.accept().unwrap(); let mut buf = [0; 1024]; - stream.read(&mut buf).unwrap(); - stream.write(&buf).unwrap(); + let _ = stream.read(&mut buf).unwrap(); + let _ = stream.write(&buf).unwrap(); }); // Create a TCP socket and send a message to the server