From 8759dc7e3389a6215f6a28e3e89e4a4912aca3c4 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 19 Aug 2021 11:24:12 +0900 Subject: Add Default to some structs --- helix-dap/src/client.rs | 8 +++----- helix-dap/src/types.rs | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'helix-dap') diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index 9b1664b3..487022cf 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -6,11 +6,9 @@ use crate::{ pub use log::{error, info}; use std::{ collections::HashMap, - net::{IpAddr, Ipv4Addr}, + net::{IpAddr, Ipv4Addr, SocketAddr}, + path::PathBuf, process::Stdio, -}; -use std::{ - net::SocketAddr, sync::{ atomic::{AtomicU64, Ordering}, Arc, @@ -160,7 +158,7 @@ impl Client { ), }, None => { - info!("unhandled event"); + info!("unhandled event {}", name); // client_tx.send(Payload::Event(ev)).expect("Failed to send"); } } diff --git a/helix-dap/src/types.rs b/helix-dap/src/types.rs index b37cef01..d85b05c0 100644 --- a/helix-dap/src/types.rs +++ b/helix-dap/src/types.rs @@ -87,7 +87,7 @@ pub struct Checksum { pub checksum: String, } -#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] +#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct Source { pub name: Option, @@ -100,7 +100,7 @@ pub struct Source { pub checksums: Option>, } -#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] +#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct SourceBreakpoint { pub line: usize, -- cgit v1.2.3-70-g09d2