chore(clippy): fix warnings from nightly

This commit is contained in:
graelo 2022-12-10 15:58:44 +01:00
parent ea8b25c2a7
commit f08cf307c6
5 changed files with 9 additions and 23 deletions

View file

@ -13,7 +13,7 @@ impl tcolor::Color for Color {
#[inline]
fn write_fg(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self.0 {
Some(value) => write!(f, "\x1B[38;5;{}m", value),
Some(value) => write!(f, "\x1B[38;5;{value}m"),
None => write!(f, "\x1B[39m"),
}
}
@ -21,7 +21,7 @@ impl tcolor::Color for Color {
#[inline]
fn write_bg(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self.0 {
Some(value) => write!(f, "\x1B[48;5;{}m", value),
Some(value) => write!(f, "\x1B[48;5;{value}m"),
None => write!(f, "\x1B[49m"),
}
}