chore(a11y, fonts): satisfy clippy in the CID width ranges and a test helper

This commit is contained in:
aiongg
2026-10-22 14:15:50 -04:00
committed by Dylan M. Taylor
parent 6b62585339
commit 3e968c8aa2
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1033,7 +1033,7 @@ fn mark_reads(f: impl FnOnce()) -> usize {
/// Page content nesting `depth` unmarked `BMC` blocks around a marked one, with `ops` operators inside. /// Page content nesting `depth` unmarked `BMC` blocks around a marked one, with `ops` operators inside.
fn deeply_nested_page(doc: &mut Document, depth: usize, ops: usize) -> pdfcraft_cos::Dict { fn deeply_nested_page(doc: &mut Document, depth: usize, ops: usize) -> pdfcraft_cos::Dict {
use pdfcraft_cos::{Dict, Stream}; use pdfcraft_cos::{Dict, Stream};
let mut data = "/Figure << /MCID 0 >> BDC ".repeat(1); let mut data = "/Figure << /MCID 0 >> BDC ".to_string();
data.push_str(&"/X BMC ".repeat(depth)); data.push_str(&"/X BMC ".repeat(depth));
data.push_str(&"0 0 1 1 re f ".repeat(ops)); data.push_str(&"0 0 1 1 re f ".repeat(ops));
data.push_str(&"EMC ".repeat(depth + 1)); data.push_str(&"EMC ".repeat(depth + 1));
+4 -4
View File
@@ -714,10 +714,10 @@ impl Metrics {
i += 2; i += 2;
} }
Some(c1) => { Some(c1) => {
if let (Some(c1), Some(v)) = (c1.as_f64(), w.get(i + 2).and_then(|x| doc.resolve(x).as_f64())) { if let (Some(c1), Some(v)) = (c1.as_f64(), w.get(i + 2).and_then(|x| doc.resolve(x).as_f64()))
if ranges.len() < MAX_CMAP_ENTRIES { && ranges.len() < MAX_CMAP_ENTRIES
ranges.push((c0, c1 as u32, v)); {
} ranges.push((c0, c1 as u32, v));
} }
i += 3; i += 3;
} }