Skip to content

Commit

Permalink
impl Debug for Rasterizer
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic committed Apr 10, 2020
1 parent 93c35fd commit c18796b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rasterizer/src/raster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,12 @@ impl Rasterizer {
self.for_each_pixel(|idx, alpha| px_fn(idx as u32 % width32, idx as u32 / width32, alpha));
}
}

impl core::fmt::Debug for Rasterizer {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Rasterizer")
.field("width", &self.width)
.field("height", &self.height)
.finish()
}
}

0 comments on commit c18796b

Please sign in to comment.