style: 💄 fmt and lint

This commit is contained in:
Lucas Colombo 2024-04-01 01:31:13 -03:00
parent 686dcbbc1f
commit 1206261943
Signed by: lucas
GPG Key ID: EF34786CFEFFAE35
3 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
mod style; mod style;
mod stylizer; mod stylizer;
pub use stylizer::{stylize, stl, Stylize}; pub use stylizer::{stl, stylize, Stylize};
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;

View File

@ -242,8 +242,8 @@ pub fn stylize<S: AsRef<str>>(s: S, instructions: &str) -> String {
/// -- /// --
/// ///
/// Stylizes a string with optional ANSI color and attributes. /// Stylizes a string with optional ANSI color and attributes.
/// ///
/// This is an alias for the `stylize` function. /// This is an alias for the `stylize` function.
pub fn stl<S: AsRef<str>>(s: S, instructions: &str) -> String { pub fn stl<S: AsRef<str>>(s: S, instructions: &str) -> String {
stylize(s, instructions) stylize(s, instructions)
} }

View File

@ -39,7 +39,7 @@ impl StyledRecord {
file: format!( file: format!(
"{}{}{}", "{}{}{}",
file_ansi_color, file_ansi_color,
record.file().unwrap_or("unknown").replace("\\", "/"), record.file().unwrap_or("unknown").replace('\\', "/"),
RESET RESET
), ),
line: format!("{}{}{}", line_ansi_color, record.line().unwrap_or(0), RESET), line: format!("{}{}{}", line_ansi_color, record.line().unwrap_or(0), RESET),