diff --git a/src/lib.rs b/src/lib.rs index 2d617e0..fe35b2a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -69,12 +69,12 @@ mod deps; pub use self::deps::*; /// Implement [`Debug`] in bulk. #[macro_export] macro_rules! impl_debug ( - (<$($T:ident $(: $U:ident)?),+> $S:ty|$self:ident,$w:ident|$body:block)=>{ + (<$($T:ident $(: $U:ident)?),+> $S:ty: |$self:ident,$w:ident|$body:block)=>{ impl <$($T$(:$U)?),+> std::fmt::Debug for $S { fn fmt (&$self, $w: &mut std::fmt::Formatter) -> std::fmt::Result $body } }; - ($S:ty|$self:ident,$w:ident|$body:block)=>{ + ($S:ty: |$self:ident,$w:ident|$body:block)=>{ impl std::fmt::Debug for $S { fn fmt (&$self, $w: &mut std::fmt::Formatter) -> std::fmt::Result $body } @@ -83,12 +83,12 @@ mod deps; pub use self::deps::*; /// Implement [`Display`] in bulk. #[macro_export] macro_rules! impl_display ( - (<$($T:ident $(: $U:ident)?),+> $S:ty|$self:ident,$w:ident|$body:block)=>{ + (<$($T:ident $(: $U:ident)?),+> $S:ty: |$self:ident,$w:ident|$body:block)=>{ impl <$($T$(:$U)?),+> std::fmt::Display for $S { fn fmt (&$self, $w: &mut std::fmt::Formatter) -> std::fmt::Result $body } }; - ($S:ty|$self:ident,$w:ident|$body:block)=>{ + ($S:ty: |$self:ident,$w:ident|$body:block)=>{ impl std::fmt::Display for $S { fn fmt (&$self, $w: &mut std::fmt::Formatter) -> std::fmt::Result $body } diff --git a/src/term/buffer.rs b/src/term/buffer.rs index fb2703f..e39e692 100644 --- a/src/term/buffer.rs +++ b/src/term/buffer.rs @@ -8,8 +8,7 @@ use ::ratatui::buffer::Cell; } impl_from!(BigBuffer: |size:(usize, usize)| Self::new(size.0, size.1)); - -impl_debug!(BigBuffer |self, f| { write!(f, "[BB {}x{} ({})]", self.width, self.height, self.content.len()) }); +impl_debug!(BigBuffer: |self, f| { write!(f, "[BB {}x{} ({})]", self.width, self.height, self.content.len()) }); impl BigBuffer { pub fn new (width: usize, height: usize) -> Self {