From 5f13c69fcfe5d12e9fe426b7ff589f8bb6a58bc3 Mon Sep 17 00:00:00 2001 From: GBA bot Date: Sat, 1 Jan 2022 11:35:17 +0000 Subject: [PATCH] Replace .map.flatten with .flat_map --- agb/src/number.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/agb/src/number.rs b/agb/src/number.rs index c81786f9..ad27a738 100644 --- a/agb/src/number.rs +++ b/agb/src/number.rs @@ -865,12 +865,11 @@ impl Rect { pub fn iter(self) -> impl Iterator { (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() } }