diff options
author | Mark Lodato <mlodato517@gmail.com> | 2020-10-22 15:39:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 19:39:38 +0000 |
commit | f33a44e1c4e3d25a5f7fec15fc843b7380ed76d1 (patch) | |
tree | 472e0f9746649e6aab82f5a6b6e533a5dbb1fffd | |
parent | 80688e082d13197b6661cfb6cfa60734034270cf (diff) | |
download | alacritty-f33a44e1c4e3d25a5f7fec15fc843b7380ed76d1.tar.gz alacritty-f33a44e1c4e3d25a5f7fec15fc843b7380ed76d1.zip |
Remove unneeded collect during line rect creation
-rw-r--r-- | alacritty/src/renderer/rects.rs | 5 |
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() } |