mirror of
https://github.com/crate-ci/typos.git
synced 2026-11-23 13:47:56 +01:00
chore: Update Styled pattern
This commit is contained in:
1 parent
dc0eafc7e5
commit
9504315f7e
1 file changed
+4
-7
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user