rustfmt the dashed-stroke port after merging main

This commit is contained in:
FredApps committed 2026-11-28 05:28:49 +07:00
1 parent 51548b5589
commit fb0c111b3e
2 files changed
+2 -6

No files matched your search

-1
View File
@@ -732,4 +732,3 @@ fn encode_png(rgba: Vec<u8>, w: u32, h: u32) -> Option<Vec<u8>> {
let image = craft_image_codecs::Image::from_u8(w, h, craft_image_codecs::ChannelLayout::Rgba, rgba).ok()?;
craft_image_codecs::encode(&image, craft_image_codecs::Format::Png, &Default::default()).ok()
}
+2 -5
View File
@@ -93,11 +93,8 @@ fn model_border(ex: &Exporter, s: Option<&StrokeSeg>, k: f64, opacity: f32) -> c
if pattern.len() % 2 == 1 {
pattern.extend(pattern.clone());
}
let pairs = pattern
.chunks(2)
.filter_map(|pair| pair.first().zip(pair.get(1)))
.map(|(dash, gap)| (*dash / st.weight, *gap / st.weight))
.collect();
let pairs =
pattern.chunks(2).filter_map(|pair| pair.first().zip(pair.get(1))).map(|(dash, gap)| (*dash / st.weight, *gap / st.weight)).collect();
Some(craft_pptx::style::Dash::Custom { pattern: pairs })
} else if matches!(st.kind, StrokeType::Dotted) {
Some(craft_pptx::style::Dash::Preset { name: "sysDot".into() })