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 };