tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 707HTML 660Markdown 12TOML 62344 Definitions

clippy fix

e9c3fcba456cfa851480a520ae38c034404a21d7 · by elbaro · (4 years ago) · parent 8b5773ca6 · browse the tree at this commit

Semantic delta · 2

benches/complex.rs

src/algo.rs

2 files · +3 −3

diff --git a/benches/complex.rs b/benches/complex.rs
index db5baa8d2..28c57938c 100644
--- a/benches/complex.rs
+++ b/benches/complex.rs
@@ -109,9 +109,9 @@ fn build_deep_hierarchy(stretch: &mut stretch2::node::Stretch) -> stretch2::node
     let node22 = stretch.new_node(stretch2::style::Style { ..Default::default() }, &[node221, node222]).unwrap();
 
     let node2 = stretch.new_node(stretch2::style::Style { ..Default::default() }, &[node21, node22]).unwrap();
-    let node0 = stretch.new_node(stretch2::style::Style { ..Default::default() }, &[node1, node2]).unwrap();
+    
 
-    node0
+    stretch.new_node(stretch2::style::Style { ..Default::default() }, &[node1, node2]).unwrap()
 }
 
 fn stretch_benchmarks(c: &mut Criterion) {
diff --git a/src/algo.rs b/src/algo.rs
index 73fb43a9b..541acfb92 100644
--- a/src/algo.rs
+++ b/src/algo.rs
@@ -406,7 +406,7 @@ impl Forest {
                     let index = flex_items
                         .iter()
                         .enumerate()
-                        .find(|&(idx, ref child)| {
+                        .find(|&(idx, child)| {
                             line_length += child.hypothetical_outer_size.main(dir);
                             if let Defined(main) = available_space.main(dir) {
                                 line_length > main && idx != 0