Skip to content

Commit

Permalink
Rename Ping to PingResponse
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
  • Loading branch information
piotrpio committed Oct 18, 2023
1 parent 6004824 commit 93f6a52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions async-nats/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub(crate) struct Endpoints {

/// Response for `PING` requests.
#[derive(Serialize, Deserialize)]
pub struct Ping {
pub struct PingResponse {
/// Response type.
#[serde(rename = "type")]
pub kind: String,
Expand Down Expand Up @@ -380,7 +380,7 @@ impl Service {
loop {
tokio::select! {
Some(ping) = pings.next() => {
let pong = serde_json::to_vec(&Ping{
let pong = serde_json::to_vec(&PingResponse{
kind: "io.nats.micro.v1.ping_response".to_string(),
name: info.name.clone(),
id: info.id.clone(),
Expand Down

0 comments on commit 93f6a52

Please sign in to comment.