mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +11:00
Replace .map.flatten with .flat_map
This commit is contained in:
parent
afe69b98b8
commit
5f13c69fcf
|
@ -865,12 +865,11 @@ impl<T: FixedWidthUnsignedInteger + core::iter::Step> Rect<T> {
|
|||
pub fn iter(self) -> impl Iterator<Item = (T, T)> {
|
||||
(self.position.x..=(self.position.x + self.size.x))
|
||||
.into_iter()
|
||||
.map(move |x| {
|
||||
.flat_map(move |x| {
|
||||
(self.position.y..=(self.position.y + self.size.y))
|
||||
.into_iter()
|
||||
.map(move |y| (x, y))
|
||||
})
|
||||
.flatten()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue