diff --git a/Cargo.lock b/Cargo.lock index f3dca3db4..9d56853c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1345,6 +1345,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.3.0" +source = "git+https://github.com/LaurenzV/krilla?rev=399dc59#399dc596fdb27fde3ca1eef27b74625affed199a" dependencies = [ "base64", "bumpalo", diff --git a/Cargo.toml b/Cargo.toml index acaaca107..35278d18b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ if_chain = "1" image = { version = "0.25.5", default-features = false, features = ["png", "jpeg", "gif"] } indexmap = { version = "2", features = ["serde"] } kamadak-exif = "0.6" -krilla = { path = "../krilla/crates/krilla", features = ["svg", "raster-images", "comemo", "rayon"] } +krilla = { git = "https://github.com/LaurenzV/krilla", rev = "399dc59", features = ["svg", "raster-images", "comemo", "rayon"] } kurbo = "0.11" libfuzzer-sys = "0.4" lipsum = "0.9" diff --git a/crates/typst-pdf/src/convert.rs b/crates/typst-pdf/src/convert.rs index 740ab5c3c..6a30ad495 100644 --- a/crates/typst-pdf/src/convert.rs +++ b/crates/typst-pdf/src/convert.rs @@ -353,7 +353,7 @@ fn finish(document: Document, gc: GlobalContext) -> SourceResult> { .unwrap_or(Span::detached()) }; - let mut errors = ve.iter().map(|e| { + let errors = ve.iter().map(|e| { match e { ValidationError::TooLongString => { error!(Span::detached(), "{prefix} a PDF string is longer \ @@ -473,12 +473,9 @@ fn finish(document: Document, gc: GlobalContext) -> SourceResult> { } } }) - .collect::>(); + .collect::>(); - // Deduplicate errors with unspanned tags. - errors.dedup(); - - Err(errors.into_iter().collect::>()) + Err(errors) } KrillaError::ImageError(i) => { let span = gc.image_to_spans.get(&i).unwrap();