Semantic delta · 1
src/compute/grid/alignment.rs
diff --git a/src/compute/block.rs b/src/compute/block.rs
index b0ea3b460..3f6f5fa2f 100644
--- a/src/compute/block.rs
+++ b/src/compute/block.rs
@@ -207,7 +207,7 @@ struct BlockItem {
#[cfg(feature = "float_layout")]
/// The `clear` style of the node
clear: Clear,
- /// Direction (LTR or RTL)
+ /// The item's direction
direction: Direction,
/// The base size of this item
diff --git a/src/compute/flexbox.rs b/src/compute/flexbox.rs
index eba3802df..5eea0cd2e 100644
--- a/src/compute/flexbox.rs
+++ b/src/compute/flexbox.rs
@@ -27,7 +27,7 @@ struct FlexItem {
/// The order of the node relative to it's siblings
order: u32,
- /// Direction (LTR or RTL)
+ /// The item's direction
direction: Direction,
/// The base size of this item
diff --git a/src/compute/grid/alignment.rs b/src/compute/grid/alignment.rs
index a0d840eb3..30eda6747 100644
--- a/src/compute/grid/alignment.rs
+++ b/src/compute/grid/alignment.rs
@@ -274,15 +274,12 @@ pub(super) fn align_and_position_item(
);
#[cfg(feature = "content_size")]
- let contribution = {
- let content_box_origin = Point { x: grid_area.left, y: grid_area.top };
- compute_content_size_contribution(
- Point { x, y } - content_box_origin,
- Size { width, height },
- layout_output.content_size,
- overflow,
- )
- };
+ let contribution = compute_content_size_contribution(
+ Point { x: x - grid_area.left, y: y - grid_area.top },
+ Size { width, height },
+ layout_output.content_size,
+ overflow,
+ );
#[cfg(not(feature = "content_size"))]
let contribution = Size::ZERO;