Browse Source

query: flatten server info for Json output

ipv6
Denis Drakhnia 1 year ago
parent
commit
d7ffcd72a3
  1. 5
      query/src/main.rs

5
query/src/main.rs

@ -34,7 +34,10 @@ enum Error {
#[serde(tag = "status")] #[serde(tag = "status")]
enum ServerResultKind { enum ServerResultKind {
#[serde(rename = "ok")] #[serde(rename = "ok")]
Ok { info: ServerInfo }, Ok {
#[serde(flatten)]
info: ServerInfo,
},
#[serde(rename = "error")] #[serde(rename = "error")]
Error { message: String }, Error { message: String },
#[serde(rename = "invalid")] #[serde(rename = "invalid")]

Loading…
Cancel
Save