Simplify some formatting

This commit is contained in:
Caleb Zulawski 2020-11-27 00:23:49 -05:00
parent 78a8d615b5
commit 35b9ab9f5c
2 changed files with 5 additions and 7 deletions

View file

@ -161,9 +161,7 @@ macro_rules! define_opaque_mask {
impl core::fmt::Debug for $name {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_list()
.entries((0..$lanes).map(|i| self.test(i)))
.finish()
core::fmt::Debug::fmt(&self.0, f)
}
}

View file

@ -84,25 +84,25 @@ macro_rules! define_mask {
impl core::fmt::Binary for $name {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
<$type as core::fmt::Binary>::fmt(&self.0, f)
core::fmt::Binary::fmt(&self.0, f)
}
}
impl core::fmt::Octal for $name {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
<$type as core::fmt::Octal>::fmt(&self.0, f)
core::fmt::Octal::fmt(&self.0, f)
}
}
impl core::fmt::LowerHex for $name {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
<$type as core::fmt::LowerHex>::fmt(&self.0, f)
core::fmt::LowerHex::fmt(&self.0, f)
}
}
impl core::fmt::UpperHex for $name {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
<$type as core::fmt::UpperHex>::fmt(&self.0, f)
core::fmt::UpperHex::fmt(&self.0, f)
}
}
}