Fix last clippy warning: decode heartbeat response
- Parse HeartbeatResponse protobuf message from API - Eliminates unused struct warning for HeartbeatResponse - Agent now has zero clippy warnings
This commit is contained in:
parent
c4024d8eb4
commit
d9156183ac
1 changed files with 10 additions and 0 deletions
|
|
@ -157,6 +157,16 @@ impl ApiClient {
|
|||
return Err(ApiError::StatusError(status));
|
||||
}
|
||||
|
||||
// Read and decode response
|
||||
let mut bytes = Vec::new();
|
||||
response
|
||||
.into_reader()
|
||||
.read_to_end(&mut bytes)
|
||||
.map_err(|e| ApiError::RequestFailed(e.to_string()))?;
|
||||
|
||||
let _heartbeat_response = agent::HeartbeatResponse::decode(&bytes[..])
|
||||
.map_err(|e| ApiError::RequestFailed(format!("Heartbeat response decode error: {}", e)))?;
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.await
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue