diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-10-11 20:28:22 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-10-11 20:28:22 +0200 |
| commit | 6f22e4f13c42f06b686a01fbdd28a0163e88ae77 (patch) | |
| tree | a78145f5f9d84325529a8529875c9ef6ca5b9a1a /src/size.rs | |
| parent | c0e4fd55e6fa738cfc5dcc851d0fc3ee2d0f2cd2 (diff) | |
Render debug boxes ðŸ§
Diffstat (limited to 'src/size.rs')
| -rw-r--r-- | src/size.rs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/size.rs b/src/size.rs index a6d38d63..b9db382e 100644 --- a/src/size.rs +++ b/src/size.rs @@ -1,7 +1,7 @@ //! General spacing types. use std::cmp::Ordering; -use std::fmt::{self, Display, Debug, Formatter}; +use std::fmt::{self, Display, Formatter}; use std::iter::Sum; use std::ops::*; use std::str::FromStr; @@ -133,11 +133,7 @@ impl Display for Size { } } -impl Debug for Size { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { - Display::fmt(self, f) - } -} +debug_display!(Size); /// An error which can be returned when parsing a size. pub struct ParseSizeError; @@ -254,11 +250,7 @@ impl Display for Size2D { } } -impl Debug for Size2D { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { - Display::fmt(self, f) - } -} +debug_display!(Size2D); impl Neg for Size2D { type Output = Size2D; @@ -349,8 +341,4 @@ impl Display for SizeBox { } } -impl Debug for SizeBox { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { - Display::fmt(self, f) - } -} +debug_display!(SizeBox); |
