style: 💄 fmt and lint
This commit is contained in:
parent
686dcbbc1f
commit
1206261943
@ -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;
|
||||||
|
|||||||
@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user