gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 231Rust 8TOML 3CSS 1317 Definitions

Fix latest clippy lints (#310)

8c57927d5ead21a21c5a9679f4a1d842316e0662 · by Nico Burns · (3 years ago) · parent c5b66e0bf · browse the tree at this commit

Semantic delta · 1

src/compute/grid/mod.rs

1 files · +1 −2

diff --git a/src/compute/grid/mod.rs b/src/compute/grid/mod.rs
index f48a8e245..d6d390310 100644
--- a/src/compute/grid/mod.rs
+++ b/src/compute/grid/mod.rs
@@ -35,7 +35,7 @@ mod util;
 ///   - Track (row/column) sizing
 ///   - Alignment & Final item placement
 pub fn compute(tree: &mut impl LayoutTree, node: Node, available_space: Size<AvailableSpace>) -> Size<f32> {
-    let get_child_styles_iter = |node| tree.children(node).into_iter().map(|child_node: &Node| tree.style(*child_node));
+    let get_child_styles_iter = |node| tree.children(node).map(|child_node: &Node| tree.style(*child_node));
     let style = tree.style(node).clone();
     let child_styles_iter = get_child_styles_iter(node);
 
@@ -57,7 +57,6 @@ pub fn compute(tree: &mut impl LayoutTree, node: Node, available_space: Size<Ava
     let grid_auto_flow = style.grid_auto_flow;
     let in_flow_children_iter = || {
         tree.children(node)
-            .into_iter()
             .copied()
             .enumerate()
             .map(|(index, child_node)| (index, child_node, tree.style(child_node)))