[Example] Add pretty print of receiving struct.

This commit is contained in:
CosminPerRam 2023-06-13 22:01:51 +03:00
parent d853189e06
commit e44a680a59

View file

@ -5,11 +5,11 @@ use std::net::IpAddr;
fn generic_query(game_name: &str, addr: &IpAddr, port: Option<u16>) -> GDResult<GenericResponse> {
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)?;
println!("{:?}", response);
println!("{:#?}", response);
Ok(response)
}