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] }