VectorCraft: An open-source, vector art tool written by scratch in pure Rust
PDF import and export: rustfmt
bflatastic2e71ab54763d
diff --git a/crates/pdf/src/encrypt.rs b/crates/pdf/src/encrypt.rsindex f506ec9d7..705ba0293 100644--- a/crates/pdf/src/encrypt.rs+++ b/crates/pdf/src/encrypt.rs@@ -154,7 +154,10 @@ pub(crate) fn warnings(set: &PdfSettings) -> Vec<String> {out.push(format!("{} encryption covers the metadata too: plaintext metadata needs PDF 1.5 or later", set.compatibility.label()));}if s.protected() && set.compatibility == Compatibility::Pdf13 {- out.push(format!("{} encrypts with a 40-bit key, which can be searched in minutes: choose PDF 1.6 or later for stronger protection", set.compatibility.label()));+ out.push(format!(+ "{} encrypts with a 40-bit key, which can be searched in minutes: choose PDF 1.6 or later for stronger protection",+ set.compatibility.label()+ ));}out}diff --git a/crates/pdf/src/import.rs b/crates/pdf/src/import.rsindex d434abedb..1c0937324 100644--- a/crates/pdf/src/import.rs+++ b/crates/pdf/src/import.rs@@ -987,7 +987,11 @@ fn stroke_layer(paint: Paint, opacity: f32, p: &StrokeProps, scale: f64) -> Stro};st.miter_limit = p.miter_limit as f64;// (Every stroke keeps its own copy: a dash array has a few entries, and one with thousands is cut.)- let dash = Dash { pattern: p.dash_array.iter().take(MAX_DASH_ENTRIES).map(|v| *v as f64 * scale).collect(), offset: p.dash_offset as f64 * scale, align_corners: false };+ let dash = Dash {+ pattern: p.dash_array.iter().take(MAX_DASH_ENTRIES).map(|v| *v as f64 * scale).collect(),+ offset: p.dash_offset as f64 * scale,+ align_corners: false,+ };// An invalid dash array (a negative value, or all zeros) strokes solid.st.dash = dash.is_dashed().then_some(dash);st