From f6195aa708b5e404736407204e849fe891b62b18 Mon Sep 17 00:00:00 2001 From: Artemy Egorov Date: Wed, 14 Aug 2024 18:55:12 +0300 Subject: [PATCH] fix: formatting add newline on end --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/daleth/format.rs | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index df92fee..ea21d56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "dalet" -version = "1.0.0-pre.19" +version = "1.0.0-pre.20" dependencies = [ "ariadne", "bincode", diff --git a/Cargo.toml b/Cargo.toml index 866f051..000c8da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dalet" -version = "1.0.0-pre.19" +version = "1.0.0-pre.20" edition = "2021" authors = ["artegoser"] license = "MIT" diff --git a/src/daleth/format.rs b/src/daleth/format.rs index 8ab72cc..6ba0937 100644 --- a/src/daleth/format.rs +++ b/src/daleth/format.rs @@ -168,5 +168,8 @@ pub fn format<'src>(spanned_tokens: &Vec>>) -> String { formatted.push_str(&to_push); } - formatted.trim().to_owned() + let mut formatted = formatted.trim().to_owned(); + formatted.push('\n'); + + formatted }