mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 18:06:18 +04:00
Add variable type to output
This commit is contained in:
parent
cc66475592
commit
89ad54a2e5
@ -1937,7 +1937,11 @@ fn variables(
|
|||||||
Ok(vars) => {
|
Ok(vars) => {
|
||||||
let mut s = String::new();
|
let mut s = String::new();
|
||||||
for var in vars {
|
for var in vars {
|
||||||
s.push_str(&format!("{} = {}; ", var.name, var.value));
|
let prefix = match var.data_type {
|
||||||
|
Some(data_type) => format!("{} ", data_type),
|
||||||
|
None => "".to_owned(),
|
||||||
|
};
|
||||||
|
s.push_str(&format!("{}{} = {}; ", prefix, var.name, var.value));
|
||||||
}
|
}
|
||||||
s
|
s
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user