style: clear two build warnings

- image_model.rs: drop unnecessary parentheses around a map's array
  literal return.
- text_support.rs: remove dead row_in_column / col_rows computation and
  its unused `li` binding (the only consumer).

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Fable 5 committed 2026-07-23 11:39:23 +03:00
1 parent fc72827428
commit 0d4bd274b4
2 files changed
+1 -21

No files matched your search

-13
View File
@@ -1285,18 +1285,6 @@ pub fn layout_mtext(opts: &MTextRenderOpts) -> MTextLayout {
}
// ── 3. Block geometry (line spacing, attachment, rotation) ───────────
// Row of each sub-line *within its own column* — the flat index only tracks
// depth down the page when there is one column. Columns sit side by side, so
// each restarts at the top and the block is as deep as its longest one.
let mut col_rows = vec![0usize; cols.count.max(1)];
let row_in_column: Vec<f32> = sub_lines
.iter()
.map(|s| {
let r = col_rows[s.column];
col_rows[s.column] = r + 1;
r as f32
})
.collect();
let ls_factor = if opts.line_spacing_factor > 0.0 {
opts.line_spacing_factor
} else {
@@ -1544,7 +1532,6 @@ pub fn layout_mtext(opts: &MTextRenderOpts) -> MTextLayout {
)
};
for (i, sub) in sub_lines.iter().enumerate() {
let li = row_in_column[i];
// The block anchors on its full width; each column then sits at its own
// offset inside it and wraps to its own width, not the block's.
let (box_left, rect_w) = if cols.active() {
+1 -8
View File
@@ -246,14 +246,7 @@ impl ImageModel {
let pts: Vec<[f64; 2]> = u
.clip_boundary_vertices
.iter()
.map(|p| {
(
[
p.x * u.x_scale / w_du,
p.y * u.y_scale / h_du,
]
)
})
.map(|p| [p.x * u.x_scale / w_du, p.y * u.y_scale / h_du])
.collect();
let mut tris = Vec::with_capacity((pts.len().saturating_sub(2)) * 3);
for i in 1..pts.len() - 1 {