on master help sign in
dap: Consistently rename type as ty
2bd8a9bBlaž Hrastnik
helix-dap/src/types.rs+3−3
@@ -26,7 +26,7 @@ pub struct ColumnDescriptor {
26 pub label: String,
26 pub label: String,
27 pub format: Option<String>,
27 pub format: Option<String>,
28 #[serde(rename = "type")]
28 #[serde(rename = "type")]
29− pub col_type: Option<String>,
29+ pub ty: Option<String>,
30 pub width: Option<usize>,
30 pub width: Option<usize>,
31}
31}
32
32
@@ -200,7 +200,7 @@ pub struct Variable {
200 pub name: String,
200 pub name: String,
201 pub value: String,
201 pub value: String,
202 #[serde(rename = "type")]
202 #[serde(rename = "type")]
203− pub data_type: Option<String>,
203+ pub ty: Option<String>,
204 pub presentation_hint: Option<VariablePresentationHint>,
204 pub presentation_hint: Option<VariablePresentationHint>,
205 pub evaluate_name: Option<String>,
205 pub evaluate_name: Option<String>,
206 pub variables_reference: usize,
206 pub variables_reference: usize,
@@ -502,7 +502,7 @@ pub mod requests {
502 pub struct EvaluateResponse {
502 pub struct EvaluateResponse {
503 pub result: String,
503 pub result: String,
504 #[serde(rename = "type")]
504 #[serde(rename = "type")]
505− pub data_type: Option<String>,
505+ pub ty: Option<String>,
506 pub presentation_hint: Option<VariablePresentationHint>,
506 pub presentation_hint: Option<VariablePresentationHint>,
507 pub variables_reference: usize,
507 pub variables_reference: usize,
508 pub named_variables: Option<usize>,
508 pub named_variables: Option<usize>,
helix-term/src/commands/dap.rs+1−1
@@ -598,7 +598,7 @@ pub fn dap_variables(cx: &mut Context) {
598 if let Ok(vars) = response {
598 if let Ok(vars) = response {
599 variables.reserve(vars.len());
599 variables.reserve(vars.len());
600 for var in vars {
600 for var in vars {
601− let prefix = match var.data_type {
601+ let prefix = match var.ty {
602 Some(data_type) => format!("{} ", data_type),
602 Some(data_type) => format!("{} ", data_type),
603 None => "".to_owned(),
603 None => "".to_owned(),
604 };
604 };