summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alacritty/src/renderer/rects.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/alacritty/src/renderer/rects.rs b/alacritty/src/renderer/rects.rs
index ca0bbd1c..31e8b82a 100644
--- a/alacritty/src/renderer/rects.rs
+++ b/alacritty/src/renderer/rects.rs
@@ -142,10 +142,9 @@ impl RenderLines {
pub fn rects(&self, metrics: &Metrics, size: &SizeInfo) -> Vec<RenderRect> {
self.inner
.iter()
- .map(|(flag, lines)| -> Vec<RenderRect> {
- lines.iter().map(|line| line.rects(*flag, metrics, size)).flatten().collect()
+ .flat_map(|(flag, lines)| {
+ lines.iter().flat_map(move |line| line.rects(*flag, metrics, size))
})
- .flatten()
.collect()
}