diff --git a/src/trim.rs b/src/trim.rs index 4606de4..5e20304 100644 --- a/src/trim.rs +++ b/src/trim.rs @@ -35,9 +35,10 @@ pub fn trim(options: &Options) -> Result { } if !options.no_preserve_newline && s.ends_with('\n') { - s + "\n" + eprintln!("Adding newline: {s:?}"); + new_string.to_owned() + "\n" } else { - new_string.to_string() + new_string.to_owned() } }) { write!(f, " '{}'", i.replace('\'', "''"))?;