compat: remove seq from Response and Event

pull/574/head
Dmitry Sharshakov 3 years ago committed by Blaž Hrastnik
parent cc650c7f4f
commit c5492788a2

@ -26,7 +26,7 @@ pub struct Request {
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
pub struct Response { pub struct Response {
pub seq: u64, // seq is omitted as unused and is not sent by some implementations
#[serde(rename = "type")] #[serde(rename = "type")]
pub msg_type: String, pub msg_type: String,
pub request_seq: u64, pub request_seq: u64,
@ -38,7 +38,7 @@ pub struct Response {
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
pub struct Event { pub struct Event {
pub seq: u64, // seq is omitted as unused and is not sent by some implementations
#[serde(rename = "type")] #[serde(rename = "type")]
pub msg_type: String, pub msg_type: String,
pub event: String, pub event: String,
@ -165,10 +165,7 @@ impl Transport {
fn process_response(res: Response) -> Result<Response> { fn process_response(res: Response) -> Result<Response> {
match res.success { match res.success {
true => { true => {
info!( info!("<- DAP success in response to {}", res.request_seq);
"<- DAP success ({}, in response to {})",
res.seq, res.request_seq
);
Ok(res) Ok(res)
} }
@ -218,10 +215,8 @@ impl Transport {
client_tx.send(msg).expect("Failed to send"); client_tx.send(msg).expect("Failed to send");
Ok(()) Ok(())
} }
Payload::Event(Event { Payload::Event(Event { ref event, .. }) => {
ref event, ref seq, .. info!("<- DAP event {}", event);
}) => {
info!("<- DAP event {} #{}", event, seq);
client_tx.send(msg).expect("Failed to send"); client_tx.send(msg).expect("Failed to send");
Ok(()) Ok(())
} }

Loading…
Cancel
Save