Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crates/pdf/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ pub fn import_with_report(bytes: &[u8], opts: &ImportOptions) -> Result<ImportRe
let msg = match w {
InterpreterWarning::UnsupportedFont => "a font could not be read; its text was skipped",
InterpreterWarning::ImageDecodeFailure => "an image could not be decoded and was skipped",
// A workspace that patches in another hayro-interpret can have more warnings: PdfCraft's
// hardened copy adds ContentTruncated (page content cut at its safety budget). With
// crates.io's two, this arm is unreachable.
#[allow(unreachable_patterns)]
_ => "part of a page's content could not be read and was skipped",
};
if let Ok(mut v) = sink2.lock()
&& !v.iter().any(|x| x == msg)
Expand Down