more and update

This commit is contained in:
Laurenz Stampfl 2025-03-11 20:49:05 +01:00
parent ccec0dedbf
commit 6af9eb9bbd
3 changed files with 5 additions and 7 deletions

1
Cargo.lock generated
View File

@ -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",

View File

@ -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"

View File

@ -353,7 +353,7 @@ fn finish(document: Document, gc: GlobalContext) -> SourceResult<Vec<u8>> {
.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<Vec<u8>> {
}
}
})
.collect::<Vec<_>>();
.collect::<EcoVec<_>>();
// Deduplicate errors with unspanned tags.
errors.dedup();
Err(errors.into_iter().collect::<EcoVec<_>>())
Err(errors)
}
KrillaError::ImageError(i) => {
let span = gc.image_to_spans.get(&i).unwrap();