Release/0.2.2 (#281) (#283)
* Fix clippy lints
* fixed vertical padding + border calculation
* changes:
added fix to release notes,
added new tests in "border_and_padding.rs"
* Bump version to 0.2.2
0329b51e09bbd7c4880d224de424c02a1f23a9ff · por Nico Burns · (hace 3 años) · padre d30d23f0a · ver el árbol en este commit
diff --git a/Cargo.toml b/Cargo.toml
index f71f7bb29..0b3179542 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "taffy"
-version = "0.2.1"
+version = "0.2.2"
authors = [
"Alice Cecile <alice.i.cecile@gmail.com>",
"Johnathan Kelley <jkelleyrtp@gmail.com>",
diff --git a/RELEASES.md b/RELEASES.md
index 3b4ced56b..4a4782b5a 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -11,6 +11,8 @@
- Added `child_count` method to `LayoutTree` for querying the number of children of a node. Required because the `children` method now returns an iterator instead of an array.
- Added `is_childless` method to `LayoutTree` for querying whether a node has no children.
+## 0.2.2
+
### Fixes
- Border or padding on the horizontal axis could, in some cases, increase the height of nodes.
diff --git a/benches/big_tree.rs b/benches/big_tree.rs
index 6c583deec..fda359e75 100644
--- a/benches/big_tree.rs
+++ b/benches/big_tree.rs
@@ -73,14 +73,13 @@ fn build_yoga_deep_hierarchy(taffy: &mut Taffy, node_count: u32, branching_facto
flex_grow: 1.0,
..Default::default()
};
- let mut build_leaf_node = |taffy: &mut Taffy| taffy.new_leaf(style.clone()).unwrap();
+ let mut build_leaf_node = |taffy: &mut Taffy| taffy.new_leaf(style).unwrap();
let mut build_flex_node =
- |taffy: &mut Taffy, children: Vec<Node>| taffy.new_with_children(style.clone(), &children).unwrap();
+ |taffy: &mut Taffy, children: Vec<Node>| taffy.new_with_children(style, &children).unwrap();
let tree = build_deep_tree(taffy, node_count, branching_factor, &mut build_leaf_node, &mut build_flex_node);
- let root = taffy.new_with_children(Style::DEFAULT, &tree).unwrap();
- root
+ taffy.new_with_children(Style::DEFAULT, &tree).unwrap()
}
fn taffy_benchmarks(c: &mut Criterion) {