Skip to content

Commit 5282754

Browse files
committed
fix(layout): use compound assignment in flex_box (clippy assign_op_pattern)
Replace and with to satisfy clippy::assign_op_pattern. CI runs clippy with -D warnings, so these previously-passing manual assigns became hard errors. Semantically equivalent (T::Length implements AddAssign).
1 parent 8df582e commit 5282754

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

float-pigment-layout/src/algo/flex_box.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ fn compute_min_content_main_size<T: LayoutTreeNode>(
206206
.size
207207
.main_size(dir);
208208
if single_line {
209-
acc = acc + contribution;
209+
acc += contribution;
210210
} else {
211211
acc = acc.max(contribution);
212212
}
@@ -780,7 +780,7 @@ impl<T: LayoutTreeNode> FlexBox<T> for LayoutUnit<T> {
780780
let clamped = flex_child.min_max_limit.main_size(cur, dir);
781781
flex_child.target_size.set_main_size(dir, clamped);
782782
let v = clamped - cur;
783-
total_violation = total_violation + v;
783+
total_violation += v;
784784
violations.push(v);
785785
}
786786
// e. Freeze over-flexed items based on the sign of the total violation:

0 commit comments

Comments
 (0)