diff options
-rw-r--r-- | src/attrs.rs | 3 | ||||
-rw-r--r-- | src/grid.rs | 4 | ||||
-rw-r--r-- | src/term.rs | 18 |
3 files changed, 4 insertions, 21 deletions
diff --git a/src/attrs.rs b/src/attrs.rs index 4b78771..8ba4e7c 100644 --- a/src/attrs.rs +++ b/src/attrs.rs @@ -95,7 +95,8 @@ impl Attrs { other: &Self, ) { if self != other && self == &Self::default() { - write!(contents, "{}", crate::term::ClearAttrs::new()).unwrap(); + write!(contents, "{}", crate::term::ClearAttrs::default()) + .unwrap(); return; } diff --git a/src/grid.rs b/src/grid.rs index a546c43..2d515ac 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -186,8 +186,8 @@ impl Grid { write!( contents, "{}{}", - crate::term::ClearAttrs::new(), - crate::term::ClearScreen::new() + crate::term::ClearAttrs::default(), + crate::term::ClearScreen::default() ) .unwrap(); diff --git a/src/term.rs b/src/term.rs index 074f177..54dfa1d 100644 --- a/src/term.rs +++ b/src/term.rs @@ -3,12 +3,6 @@ #[derive(Default, Debug)] pub struct ClearScreen; -impl ClearScreen { - pub fn new() -> Self { - Self::default() - } -} - impl std::fmt::Display for ClearScreen { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.write_str("\x1b[H\x1b[J") @@ -18,12 +12,6 @@ impl std::fmt::Display for ClearScreen { #[derive(Default, Debug)] pub struct CRLF; -impl CRLF { - pub fn new() -> Self { - Self::default() - } -} - impl std::fmt::Display for CRLF { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.write_str("\r\n") @@ -58,12 +46,6 @@ impl std::fmt::Display for MoveTo { #[derive(Default, Debug)] pub struct ClearAttrs; -impl ClearAttrs { - pub fn new() -> Self { - Self::default() - } -} - impl std::fmt::Display for ClearAttrs { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.write_str("\x1b[m") |