Implement Debug manually for ColorSpace
This commit is contained in:
parent
0d612fd3c2
commit
bfbf032fff
1 changed files with 13 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
use std::fmt::{self, Debug};
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct ColorSpace {
|
||||
pub r_linear: bool,
|
||||
pub g_linear: bool,
|
||||
|
@ -56,3 +58,13 @@ impl From<ColorSpace> for u8 {
|
|||
value.to_u8()
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for ColorSpace {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"ColorSpace({}{}{}{})",
|
||||
self.r_linear as u8, self.g_linear as u8, self.b_linear as u8, self.a_linear as u8
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue