diff --git a/src/main.rs b/src/main.rs index 6c5023a..92529a2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,6 +81,6 @@ fn main() { let msg = socket.read_message().expect("Error reading message"); let resp: message_types::ServerResponse = serde_json::from_str(msg.into_text().unwrap().as_str()).unwrap(); - println!("recieved: {:?}", resp); + println!("recieved: {:?}\n{:?}", resp.message, resp.search_results); socket.close(None).unwrap(); } diff --git a/src/message_types.rs b/src/message_types.rs index 1c8fea5..a9d7d9c 100644 --- a/src/message_types.rs +++ b/src/message_types.rs @@ -73,8 +73,9 @@ impl PartialTag { } } -#[derive(Serialize, Deserialize, Debug)] +#[derive(Serialize, Deserialize)] pub struct ServerResponse { + pub message: String, pub search_results: Vec, }