pdf: elide explicit lifetime in wire test helper
- Commit
efa2a19149da0ef32b6323433e424e9c947d71b9- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-01 22:01 UTC (4 days ago)
- Parents
8c7dd5e
Workspace clippy flagged the explicit 'a on payload_at in wire_part1's tests; the lifetimes elide cleanly from the single input reference. Left standing in this crate: four items_after_test_module notes -- moving the test modules in the split part files is pure layout churn with no code effect, deferred rather than done as hygiene. Verified: cargo clippy -p pdf_render --all-targets shows only those four, cargo test -p pdf_render (676 passed), fmt clean.
Diff
pdf/src/main/rust/src/wire_part1.rs
diff --git a/pdf/src/main/rust/src/wire_part1.rs b/pdf/src/main/rust/src/wire_part1.rsindex 2f93862a1d..84540df7ea 100644--- a/pdf/src/main/rust/src/wire_part1.rs+++ b/pdf/src/main/rust/src/wire_part1.rs@@ -444,7 +444,7 @@ mod tests { }], }; // Payload offset: header (20) + tag (1) + ctm (24) + w/h (8).- fn payload_at<'a>(buf: &'a [u8]) -> (u8, &'a [u8]) {+ fn payload_at(buf: &[u8]) -> (u8, &[u8]) { let format_at = HEADER_LEN + 1 + 24 + 8; (buf[format_at], &buf[format_at + 1 + 4 + 1 + 1 + 4..]) }