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:
Graham McIntire 2026-01-13 13:52:10 -06:00
parent c4024d8eb4
commit d9156183ac
No known key found for this signature in database

View file

@ -157,6 +157,16 @@ impl ApiClient {
return Err(ApiError::StatusError(status)); 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(()) Ok(())
}) })
.await .await