mirror of
https://github.com/yuri91/ili9341-rs.git
synced 2024-11-25 08:00:59 +00:00
Improve readability
This commit is contained in:
parent
8c45de7e90
commit
ed2b2eeed4
1 changed files with 3 additions and 1 deletions
|
@ -82,12 +82,14 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clear(&mut self, color: Rgb565) -> Result<(), Self::Error> {
|
fn clear(&mut self, color: Rgb565) -> Result<(), Self::Error> {
|
||||||
|
let color = RawU16::from(color).into_inner();
|
||||||
|
|
||||||
self.draw_iter(
|
self.draw_iter(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
(self.width - 1) as u16,
|
(self.width - 1) as u16,
|
||||||
(self.height - 1) as u16,
|
(self.height - 1) as u16,
|
||||||
iter::repeat(RawU16::from(color).into_inner()).take(self.width * self.height),
|
iter::repeat(color).take(self.width * self.height),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue