dap: Consistently rename type as ty

pull/574/head
Blaž Hrastnik 3 years ago
parent 31b431bfdd
commit 2bd8a9b39d

@ -26,7 +26,7 @@ pub struct ColumnDescriptor {
pub label: String, pub label: String,
pub format: Option<String>, pub format: Option<String>,
#[serde(rename = "type")] #[serde(rename = "type")]
pub col_type: Option<String>, pub ty: Option<String>,
pub width: Option<usize>, pub width: Option<usize>,
} }
@ -200,7 +200,7 @@ pub struct Variable {
pub name: String, pub name: String,
pub value: String, pub value: String,
#[serde(rename = "type")] #[serde(rename = "type")]
pub data_type: Option<String>, pub ty: Option<String>,
pub presentation_hint: Option<VariablePresentationHint>, pub presentation_hint: Option<VariablePresentationHint>,
pub evaluate_name: Option<String>, pub evaluate_name: Option<String>,
pub variables_reference: usize, pub variables_reference: usize,
@ -502,7 +502,7 @@ pub mod requests {
pub struct EvaluateResponse { pub struct EvaluateResponse {
pub result: String, pub result: String,
#[serde(rename = "type")] #[serde(rename = "type")]
pub data_type: Option<String>, pub ty: Option<String>,
pub presentation_hint: Option<VariablePresentationHint>, pub presentation_hint: Option<VariablePresentationHint>,
pub variables_reference: usize, pub variables_reference: usize,
pub named_variables: Option<usize>, pub named_variables: Option<usize>,

@ -598,7 +598,7 @@ pub fn dap_variables(cx: &mut Context) {
if let Ok(vars) = response { if let Ok(vars) = response {
variables.reserve(vars.len()); variables.reserve(vars.len());
for var in vars { for var in vars {
let prefix = match var.data_type { let prefix = match var.ty {
Some(data_type) => format!("{} ", data_type), Some(data_type) => format!("{} ", data_type),
None => "".to_owned(), None => "".to_owned(),
}; };

Loading…
Cancel
Save