From f33a44e1c4e3d25a5f7fec15fc843b7380ed76d1 Mon Sep 17 00:00:00 2001 From: Mark Lodato Date: Thu, 22 Oct 2020 15:39:38 -0400 Subject: Remove unneeded collect during line rect creation --- alacritty/src/renderer/rects.rs | 5 ++--- 1 file 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 { self.inner .iter() - .map(|(flag, lines)| -> Vec { - 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() } -- cgit v1.2.3-54-g00ecf