mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-22 17:11:07 -05:00
chore: Update Styled pattern
This commit is contained in:
parent
dc0eafc7e5
commit
9504315f7e
1 changed files with 4 additions and 7 deletions
|
@ -53,13 +53,10 @@ impl<D: std::fmt::Display> std::fmt::Display for Styled<D> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
if f.alternate() {
|
if f.alternate() {
|
||||||
write!(
|
write!(f, "{}", self.style.render())?;
|
||||||
f,
|
self.display.fmt(f)?;
|
||||||
"{}{}{}",
|
write!(f, "{}", self.style.render_reset())?;
|
||||||
self.style.render(),
|
Ok(())
|
||||||
self.display,
|
|
||||||
self.style.render_reset()
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
self.display.fmt(f)
|
self.display.fmt(f)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue