diff --git a/src/render.rs b/src/render.rs index c348755..944b071 100644 --- a/src/render.rs +++ b/src/render.rs @@ -15,8 +15,8 @@ pub trait Renderer { fn purge(&mut self) -> Result<(), Error>; } -pub struct WriteRenderer { - out: Box, +pub struct WriteRenderer { + out: T, array: Array2D, } @@ -31,8 +31,8 @@ impl Default for Cell { fn default() -> Self { Cell::Keep } } -impl WriteRenderer { - pub fn new(out: Box, width: usize, height: usize) -> Self { +impl WriteRenderer { + pub fn new(out: T, width: usize, height: usize) -> Self { Self { out, array: Array2D::new(width, height) @@ -40,7 +40,7 @@ impl WriteRenderer { } } -impl Renderer for WriteRenderer { +impl Renderer for WriteRenderer { fn width(&self) -> usize { self.array.width() }