diff --git a/src/epd1in54/graphics.rs b/src/epd1in54/graphics.rs index 7206b10..a0114a0 100644 --- a/src/epd1in54/graphics.rs +++ b/src/epd1in54/graphics.rs @@ -25,7 +25,7 @@ impl Default for Display1in54 { impl Drawing for Display1in54 { fn draw(&mut self, item_pixels: T) where - T: Iterator>, + T: IntoIterator>, { self.draw_helper(WIDTH, HEIGHT, item_pixels); } diff --git a/src/epd2in9/graphics.rs b/src/epd2in9/graphics.rs index 816087c..d9b723c 100644 --- a/src/epd2in9/graphics.rs +++ b/src/epd2in9/graphics.rs @@ -25,7 +25,7 @@ impl Default for Display2in9 { impl Drawing for Display2in9 { fn draw(&mut self, item_pixels: T) where - T: Iterator>, + T: IntoIterator>, { self.draw_helper(WIDTH, HEIGHT, item_pixels); } diff --git a/src/epd4in2/graphics.rs b/src/epd4in2/graphics.rs index 83f5459..1993590 100644 --- a/src/epd4in2/graphics.rs +++ b/src/epd4in2/graphics.rs @@ -27,7 +27,7 @@ impl Drawing for Display4in2 { where T: IntoIterator>, { - self.draw_helper(WIDTH, HEIGHT, item_pixels.into_iter()); + self.draw_helper(WIDTH, HEIGHT, item_pixels); } } diff --git a/src/graphics.rs b/src/graphics.rs index 437abcd..a801096 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -47,7 +47,7 @@ pub trait Display: Drawing { /// Becomes uneccesary when const_generics become stablised fn draw_helper(&mut self, width: u32, height: u32, item_pixels: T) where - T: Iterator>, + T: IntoIterator>, { let rotation = self.rotation(); let buffer = self.get_mut_buffer(); @@ -124,7 +124,7 @@ impl<'a> Drawing for VarDisplay<'a> { where T: IntoIterator>, { - self.draw_helper(self.width, self.height, item_pixels.into_iter()); + self.draw_helper(self.width, self.height, item_pixels); } }