From dc73e124730282056a32ac9ff64227732dfaf478 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 23 Jun 2020 15:23:43 -0700 Subject: [PATCH] `usvg` should never have nested `` nodes, so remove code that (doesn't) handle that case. Closes #349. --- svg/src/lib.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/svg/src/lib.rs b/svg/src/lib.rs index 1abbd470..291bba80 100644 --- a/svg/src/lib.rs +++ b/svg/src/lib.rs @@ -52,12 +52,11 @@ bitflags! { const UNSUPPORTED_IMAGE_NODE = 0x0002; const UNSUPPORTED_MASK_NODE = 0x0004; const UNSUPPORTED_PATTERN_NODE = 0x0008; - const UNSUPPORTED_NESTED_SVG_NODE = 0x0010; - const UNSUPPORTED_MULTIPLE_CLIP_PATHS = 0x0020; - const UNSUPPORTED_LINK_PAINT = 0x0040; - const UNSUPPORTED_FILTER_ATTR = 0x0080; - const UNSUPPORTED_MASK_ATTR = 0x0100; - const UNSUPPORTED_GRADIENT_SPREAD_METHOD = 0x0200; + const UNSUPPORTED_MULTIPLE_CLIP_PATHS = 0x0010; + const UNSUPPORTED_LINK_PAINT = 0x0020; + const UNSUPPORTED_FILTER_ATTR = 0x0040; + const UNSUPPORTED_MASK_ATTR = 0x0080; + const UNSUPPORTED_GRADIENT_SPREAD_METHOD = 0x0100; } } @@ -236,10 +235,7 @@ impl BuiltSVG { self.result_flags .insert(BuildResultFlags::UNSUPPORTED_PATTERN_NODE); } - NodeKind::Svg(..) => { - self.result_flags - .insert(BuildResultFlags::UNSUPPORTED_NESTED_SVG_NODE); - } + NodeKind::Svg(..) => unreachable!(), } }