- Commit
- a929b664b10c69d7138a017ddaa701f54fc05ced
- Parent
- 1f6923e9a5b3df957b6e32d4256e98587104e217
- Author
- Pablo <pablo-pie@riseup.net>
- Date
Implemented Clippy suggestions
Yet another static page generator for photo galleries
Implemented Clippy suggestions
1 file changed, 3 insertions, 3 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | src/log.rs | 6 | 3 | 3 |
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) };