on master help sign in
compat: remove seq from Response and Event
commitc5492788a23056dd82874a8524226dc20e2becc8 authorDmitry Sharshakov <d3dx12.xx@gmail.com> dateSat 14 Aug 2021, 11:13 (5 years ago) parentcc650c7
1 file changed+5−10
helix-dap/src/transport.rs+5−10
helix-dap/src/transport.rs+5−10
@@ -26,7 +26,7 @@ pub struct Request {
2626
2727#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
2828pub struct Response {
29− pub seq: u64,
29+ // seq is omitted as unused and is not sent by some implementations
3030 #[serde(rename = "type")]
3131 pub msg_type: String,
3232 pub request_seq: u64,
@@ -38,7 +38,7 @@ pub struct Response {
3838
3939#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
4040pub struct Event {
41− pub seq: u64,
41+ // seq is omitted as unused and is not sent by some implementations
4242 #[serde(rename = "type")]
4343 pub msg_type: String,
4444 pub event: String,
@@ -165,10 +165,7 @@ impl Transport {
165165 fn process_response(res: Response) -> Result<Response> {
166166 match res.success {
167167 true => {
168− info!(
169− "<- DAP success ({}, in response to {})",
170− res.seq, res.request_seq
171− );
168+ info!("<- DAP success in response to {}", res.request_seq);
172169
173170 Ok(res)
174171 }
@@ -218,10 +215,8 @@ impl Transport {
218215 client_tx.send(msg).expect("Failed to send");
219216 Ok(())
220217 }
221− Payload::Event(Event {
222− ref event, ref seq, ..
223− }) => {
224− info!("<- DAP event {} #{}", event, seq);
218+ Payload::Event(Event { ref event, .. }) => {
219+ info!("<- DAP event {}", event);
225220 client_tx.send(msg).expect("Failed to send");
226221 Ok(())
227222 }