From 74dedb4c07b2d55067b0b269b9e9a20fadfa8e26 Mon Sep 17 00:00:00 2001 From: IogaMaster <67164465+IogaMaster@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:15:49 -0600 Subject: [PATCH] Format (#43) Fix formatting issue --- src/formatting.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/formatting.rs b/src/formatting.rs index b57819c..397446d 100644 --- a/src/formatting.rs +++ b/src/formatting.rs @@ -129,7 +129,9 @@ pub(crate) fn add_newline_at_end_of_file(out: Vec) -> Vec { /// and afterwards include the new lines and indentation correctly /// according to the configuration fn trim_ascii_whitespace(x: &[u8]) -> &[u8] { - let Some(from) = x.iter().position(|x| !x.is_ascii_whitespace()) else { return &x[0..0] }; + let Some(from) = x.iter().position(|x| !x.is_ascii_whitespace()) else { + return &x[0..0]; + }; let to = x.iter().rposition(|x| !x.is_ascii_whitespace()).unwrap(); &x[from..=to] }