compute the newline and the indentation of the current depth

This commit is contained in:
amtoine 2023-03-11 11:34:38 +01:00
parent ff93bb6894
commit 3be1e20c74
No known key found for this signature in database
GPG Key ID: 37AAE9B486CFF1AB

View File

@ -100,6 +100,9 @@ pub fn value_to_string(
depth: usize,
indent: &Option<String>,
) -> Result<String, ShellError> {
let nl = get_true_newline(indent);
let idt = get_true_indentation(depth, indent);
match v {
Value::Binary { val, .. } => {
let mut s = String::with_capacity(2 * val.len());