fix: formatting add newline on end

This commit is contained in:
Artemy Egorov 2024-08-14 18:55:12 +03:00
parent 61a6aaf48c
commit f6195aa708
3 changed files with 6 additions and 3 deletions

2
Cargo.lock generated
View file

@ -201,7 +201,7 @@ dependencies = [
[[package]] [[package]]
name = "dalet" name = "dalet"
version = "1.0.0-pre.19" version = "1.0.0-pre.20"
dependencies = [ dependencies = [
"ariadne", "ariadne",
"bincode", "bincode",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "dalet" name = "dalet"
version = "1.0.0-pre.19" version = "1.0.0-pre.20"
edition = "2021" edition = "2021"
authors = ["artegoser"] authors = ["artegoser"]
license = "MIT" license = "MIT"

View file

@ -168,5 +168,8 @@ pub fn format<'src>(spanned_tokens: &Vec<Spanned<Token<'src>>>) -> String {
formatted.push_str(&to_push); formatted.push_str(&to_push);
} }
formatted.trim().to_owned() let mut formatted = formatted.trim().to_owned();
formatted.push('\n');
formatted
} }