aboutsummaryrefslogtreecommitdiffstats
path: root/src/attrs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/attrs.rs')
-rw-r--r--src/attrs.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/attrs.rs b/src/attrs.rs
index 8ba4e7c..08ec857 100644
--- a/src/attrs.rs
+++ b/src/attrs.rs
@@ -1,4 +1,4 @@
-use std::io::Write as _;
+use crate::term::BufWrite as _;
/// Represents a foreground or background color for cells.
#[derive(Eq, PartialEq, Debug, Copy, Clone)]
@@ -95,8 +95,7 @@ impl Attrs {
other: &Self,
) {
if self != other && self == &Self::default() {
- write!(contents, "{}", crate::term::ClearAttrs::default())
- .unwrap();
+ crate::term::ClearAttrs::default().write_buf(contents);
return;
}
@@ -133,6 +132,6 @@ impl Attrs {
attrs.inverse(self.inverse())
};
- write!(contents, "{}", attrs).unwrap();
+ attrs.write_buf(contents);
}
}