[Crate] Fix clippy lints

This commit is contained in:
CosminPerRam 2023-07-18 15:31:35 +03:00
parent ea1360441c
commit 23669531b6
2 changed files with 3 additions and 3 deletions

View file

@ -88,7 +88,7 @@ fn main() -> GDResult<()> {
}
true => Some(args[3].parse::<u16>().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)?),

View file

@ -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