From 62ad12650f3ecfb1b059556e03287d19752cbdff Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 18 Dec 2023 20:32:24 +0100 Subject: [PATCH] Use spaces for indentation. --- ast/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ast/src/lib.rs b/ast/src/lib.rs index d4d0569e7..7e237a246 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -80,7 +80,10 @@ pub fn evaluate_unary_operation(op: UnaryOperator, v: T) -> T { fn indent(s: S, indentation: usize) -> String { s.to_string() .split('\n') - .map(|line| format!("{}{line}", "\t".repeat(indentation))) + .map(|line| match line { + "" => "".to_string(), + _ => format!("{}{line}", " ".repeat(indentation)), + }) .join("\n") }