Add display impl for Points<T>

This commit is contained in:
Joe Wilm 2016-12-10 11:27:42 -08:00
parent 4ba2931437
commit bffe512c33
1 changed files with 6 additions and 0 deletions

View File

@ -142,6 +142,12 @@ impl<T: Display> Display for Pixels<T> {
}
}
impl<T: Display> Display for Points<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}pts", self.0)
}
}
impl ::std::error::Error for Error {
fn cause(&self) -> Option<&::std::error::Error> {
match *self {