add Display trait to our Pixel trait
This commit is contained in:
parent
ce7d8edc6d
commit
700f650561
|
@ -1,4 +1,5 @@
|
||||||
use num_traits::{PrimInt, Unsigned};
|
use num_traits::{PrimInt, Unsigned};
|
||||||
|
use std::fmt::Display;
|
||||||
|
|
||||||
pub mod bitmap;
|
pub mod bitmap;
|
||||||
pub mod bitmapatlas;
|
pub mod bitmapatlas;
|
||||||
|
@ -10,5 +11,5 @@ pub mod palette;
|
||||||
pub mod prelude;
|
pub mod prelude;
|
||||||
|
|
||||||
/// Common trait to represent single pixel/colour values.
|
/// Common trait to represent single pixel/colour values.
|
||||||
pub trait Pixel: PrimInt + Unsigned + Default {}
|
pub trait Pixel: PrimInt + Unsigned + Default + Display {}
|
||||||
impl<T> Pixel for T where T: PrimInt + Unsigned + Default {}
|
impl<T> Pixel for T where T: PrimInt + Unsigned + Default + Display {}
|
||||||
|
|
Loading…
Reference in a new issue