From 62af4f87cae57d1255fef91560d6393a8afb3e7e Mon Sep 17 00:00:00 2001 From: ihsan mokhlisse <16743959+ihsanmokhlisse@users.noreply.github.com> Date: Thu, 22 Oct 2026 17:07:36 +0200 Subject: [PATCH] M7: compile the paragraph fixture on current main (#2517) The paragraph-key helper has to carry reflow text, which a width change uses. ClosePath on an empty subpath is a match guard so the edit crate still passes clippy. --- crates/edit/src/images.rs | 8 +++----- crates/edit/src/text_regions/grouping.rs | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/edit/src/images.rs b/crates/edit/src/images.rs index 5180e76018..f66e7f24ee 100644 --- a/crates/edit/src/images.rs +++ b/crates/edit/src/images.rs @@ -186,11 +186,9 @@ impl ImageState { self.path.curve_to(self.point(x1, y1), end, end); } } - b"h" => { - // ClosePath with no subpath panics by the same contract (#3581). - if self.path.elements().last().is_some() { - self.path.close_path(); - } + // ClosePath with no subpath panics by the same contract (#3581). + b"h" if self.path.elements().last().is_some() => { + self.path.close_path(); } b"re" => { if let Some([x, y, w, h]) = op.nums::<4>() { diff --git a/crates/edit/src/text_regions/grouping.rs b/crates/edit/src/text_regions/grouping.rs index f866daef5e..df281eb922 100644 --- a/crates/edit/src/text_regions/grouping.rs +++ b/crates/edit/src/text_regions/grouping.rs @@ -235,7 +235,7 @@ fn group_layout(lines: &[TextLine], mixed: bool) -> Vec { // A bullet of its own opens a list item (#2564): such a row is a new paragraph, and // letting it join is what made an edit of the row above delete this item and the ones // after it. - if starts_list_item(&row, lines) { + if starts_list_item(row, lines) { return false; } let Some(prev_row) = block.rows.last() else { return false };