Fit the landed changes together

Format the attachment-key numbering kept from both sides of #5508's merge.
This commit is contained in:
bflatastic committed 2026-11-09 18:32:42 +07:00
1 parent 74cc90dc50
commit d92046f815
1 file changed
+2 -1
+2 -1
View File
@@ -39,7 +39,8 @@ fn write_attachments(dst: &mut Document, entries: &mut [(Vec<u8>, Object)], uniq
// Names are compared and numbered as text: a key written as UTF-16 (a name with an accent
// or Chinese letters) must not get ASCII bytes appended to it.
if uniquify {
let reserved: std::collections::HashSet<String> = entries.iter().map(|(k, _)| pdfcraft_cos::PdfString::literal(k.clone()).to_text()).collect();
let reserved: std::collections::HashSet<String> =
entries.iter().map(|(k, _)| pdfcraft_cos::PdfString::literal(k.clone()).to_text()).collect();
let mut seen = std::collections::HashSet::new();
for (k, _) in entries.iter_mut() {
let base = pdfcraft_cos::PdfString::literal(k.clone()).to_text();