mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Example] Add pretty print of receiving struct.
This commit is contained in:
parent
d853189e06
commit
e44a680a59
1 changed files with 2 additions and 2 deletions
|
|
@ -5,11 +5,11 @@ use std::net::IpAddr;
|
||||||
fn generic_query(game_name: &str, addr: &IpAddr, port: Option<u16>) -> GDResult<GenericResponse> {
|
fn generic_query(game_name: &str, addr: &IpAddr, port: Option<u16>) -> GDResult<GenericResponse> {
|
||||||
let game = GAMES.get(game_name).expect("Game doesn't exist");
|
let game = GAMES.get(game_name).expect("Game doesn't exist");
|
||||||
|
|
||||||
println!("Querying {:?} with {:?}", addr, game);
|
println!("Querying {:#?} with game {:#?}.", addr, game.name);
|
||||||
|
|
||||||
let response = query(game, addr, port)?;
|
let response = query(game, addr, port)?;
|
||||||
|
|
||||||
println!("{:?}", response);
|
println!("{:#?}", response);
|
||||||
|
|
||||||
Ok(response)
|
Ok(response)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue