Skip to content

Commit

Permalink
sorcery suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
aaravm committed Jul 11, 2024
1 parent 00b6367 commit 6566d7d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/serviceinfo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct ServiceInfo {

impl ServiceInfo {
pub fn new(config: &Configuration) -> Result<Self, Box<dyn std::error::Error>> {
let transport = &Transport::new(config);
let transport = Transport::new(config);
let instance = ServiceInfo {
transport: transport.clone(),
};
Expand All @@ -22,12 +22,12 @@ impl ServiceInfo {
Ok(response_body) => match serde_json::from_str::<models::Service>(&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)
}
}
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 6566d7d

Please sign in to comment.