From 39dc31e8ea2aba538f92fe52c2822e3c2b0d38e1 Mon Sep 17 00:00:00 2001 From: Laurenz Stampfl <47084093+LaurenzV@users.noreply.github.com> Date: Thu, 7 Dec 2023 20:14:47 +0100 Subject: [PATCH] Format --- crates/usvg/src/writer.rs | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/crates/usvg/src/writer.rs b/crates/usvg/src/writer.rs index e67e93b7a..abff93579 100644 --- a/crates/usvg/src/writer.rs +++ b/crates/usvg/src/writer.rs @@ -975,11 +975,11 @@ fn conv_element(node: &Node, is_clip_path: bool, ctx: &mut WriterContext, xml: & ("line-through", &span.decoration.line_through), ("overline", &span.decoration.overline), ] - .iter() - .filter_map(|&(key, option_value)| { - option_value.as_ref().map(|value| (key, value)) - }) - .collect(); + .iter() + .filter_map(|&(key, option_value)| { + option_value.as_ref().map(|value| (key, value)) + }) + .collect(); // Decorations need to be dumped BEFORE we write the actual span data // (so that for example stroke color of span doesn't affect the text @@ -1695,15 +1695,9 @@ fn write_span( xml.start_svg_element(EId::Tspan); match baseline_shift { BaselineShift::Baseline => {} - BaselineShift::Number(num) => { - xml.write_svg_attribute(AId::BaselineShift, num) - } - BaselineShift::Subscript => { - xml.write_svg_attribute(AId::BaselineShift, "sub") - } - BaselineShift::Superscript => { - xml.write_svg_attribute(AId::BaselineShift, "super") - } + BaselineShift::Number(num) => xml.write_svg_attribute(AId::BaselineShift, num), + BaselineShift::Subscript => xml.write_svg_attribute(AId::BaselineShift, "sub"), + BaselineShift::Superscript => xml.write_svg_attribute(AId::BaselineShift, "super"), } }