Skip to content

Commit

Permalink
Fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
javachaos committed Mar 25, 2024
1 parent 6177ef7 commit ff7f4e7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
14 changes: 12 additions & 2 deletions src/loggers/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ where
}

#[cfg(feature = "paris")]
return write_args(record, write, config.enable_paris_formatting, &config.line_ending);
return write_args(
record,
write,
config.enable_paris_formatting,
&config.line_ending,
);
#[cfg(not(feature = "paris"))]
return write_args(record, write, &config.line_ending);
}
Expand Down Expand Up @@ -227,7 +232,12 @@ where

#[inline(always)]
#[cfg(feature = "paris")]
pub fn write_args<W>(record: &Record<'_>, write: &mut W, with_colors: bool, line_ending: &str) -> Result<(), Error>
pub fn write_args<W>(
record: &Record<'_>,
write: &mut W,
with_colors: bool,
line_ending: &str,
) -> Result<(), Error>
where
W: Write + Sized,
{
Expand Down
7 changes: 6 additions & 1 deletion src/loggers/termlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ impl TermLogger {
}

#[cfg(feature = "paris")]
write_args(record, term_lock, self.config.enable_paris_formatting)?;
write_args(
record,
term_lock,
self.config.enable_paris_formatting,
&self.config.line_ending,
)?;
#[cfg(not(feature = "paris"))]
write_args(record, term_lock, &self.config.line_ending)?;

Expand Down

0 comments on commit ff7f4e7

Please sign in to comment.