mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Crate] Fix clippy lints
This commit is contained in:
parent
ea1360441c
commit
23669531b6
2 changed files with 3 additions and 3 deletions
|
|
@ -88,7 +88,7 @@ fn main() -> GDResult<()> {
|
||||||
}
|
}
|
||||||
true => Some(args[3].parse::<u16>().expect("Invalid port!")),
|
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() {
|
match args[1].as_str() {
|
||||||
"aliens" => println!("{:#?}", aliens::query(ip, port)?),
|
"aliens" => println!("{:#?}", aliens::query(ip, port)?),
|
||||||
|
|
|
||||||
|
|
@ -109,8 +109,8 @@ mod tests {
|
||||||
let server_thread = thread::spawn(move || {
|
let server_thread = thread::spawn(move || {
|
||||||
let (mut stream, _) = listener.accept().unwrap();
|
let (mut stream, _) = listener.accept().unwrap();
|
||||||
let mut buf = [0; 1024];
|
let mut buf = [0; 1024];
|
||||||
stream.read(&mut buf).unwrap();
|
let _ = stream.read(&mut buf).unwrap();
|
||||||
stream.write(&buf).unwrap();
|
let _ = stream.write(&buf).unwrap();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create a TCP socket and send a message to the server
|
// Create a TCP socket and send a message to the server
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue