From 6566d7d9abf454a13ac0dcfd0472629bf0af6591 Mon Sep 17 00:00:00 2001 From: aaravm Date: Thu, 11 Jul 2024 14:26:06 +0530 Subject: [PATCH] sorcery suggestions --- lib/src/serviceinfo/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/serviceinfo/mod.rs b/lib/src/serviceinfo/mod.rs index dbf532f..cf9b27c 100644 --- a/lib/src/serviceinfo/mod.rs +++ b/lib/src/serviceinfo/mod.rs @@ -9,7 +9,7 @@ pub struct ServiceInfo { impl ServiceInfo { pub fn new(config: &Configuration) -> Result> { - let transport = &Transport::new(config); + let transport = Transport::new(config); let instance = ServiceInfo { transport: transport.clone(), }; @@ -22,12 +22,12 @@ impl ServiceInfo { Ok(response_body) => match serde_json::from_str::(&response_body) { Ok(service) => Ok(service), Err(e) => { - log::error!("Failed to deserialize response: {}", e); + log::error!("Failed to deserialize response: {}. Response body: {}", e, response_body); Err(e.into()) } }, Err(e) => { - log::error!("Error: {}", e); + log::error!("Error getting response: {}", e); Err(e) } } @@ -55,7 +55,7 @@ mod tests { println!("Service Info: {:?}", service); } Err(e) => { - println!("Failed to get service info: {}", e); + log::error!("ServiceInfo error in module 'mod.rs': {}", e); } } }