mirror of
https://github.com/crate-ci/typos.git
synced 2024-12-22 15:42:23 -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]
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
if f.alternate() {
|
||||
write!(
|
||||
f,
|
||||
"{}{}{}",
|
||||
self.style.render(),
|
||||
self.display,
|
||||
self.style.render_reset()
|
||||
)
|
||||
write!(f, "{}", self.style.render())?;
|
||||
self.display.fmt(f)?;
|
||||
write!(f, "{}", self.style.render_reset())?;
|
||||
Ok(())
|
||||
} else {
|
||||
self.display.fmt(f)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue