diff --git a/src/log.rs b/src/log.rs
@@ -19,7 +19,7 @@ pub(crate) fn log(level: Level, args: &Arguments<'_>, newline: bool) {
let mut stderr = io::stderr();
let _ = write!(stderr, "{} ", "[ERROR]".red().bold());
let _ = if newline {
- write!(stderr, "{}\n", args)
+ writeln!(stderr, "{}", args)
} else {
write!(stderr, "{}", args)
};
@@ -29,7 +29,7 @@ pub(crate) fn log(level: Level, args: &Arguments<'_>, newline: bool) {
let mut stdout = io::stdout().lock();
let _ = write!(stdout, "{} ", "[INFO]".green().bold());
let _ = if newline {
- write!(stdout, "{}\n", args)
+ writeln!(stdout, "{}", args)
} else {
write!(stdout, "{}", args)
};
@@ -39,7 +39,7 @@ pub(crate) fn log(level: Level, args: &Arguments<'_>, newline: bool) {
let mut stdout = io::stdout().lock();
let _ = write!(stdout, "{} ", "[WARNING]".yellow().bold());
let _ = if newline {
- write!(stdout, "{}\n", args)
+ writeln!(stdout, "{}", args)
} else {
write!(stdout, "{}", args)
};