From: Ben Pfaff Date: Fri, 2 Jan 2026 18:27:36 +0000 (-0800) Subject: cleanup X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a6f6f0ac17ae6622b3da698bcffdce7d5510b3c;p=pspp cleanup --- diff --git a/rust/pspp/src/spv/read/legacy_xml.rs b/rust/pspp/src/spv/read/legacy_xml.rs index c5bc81fa8b..5a56934d88 100644 --- a/rust/pspp/src/spv/read/legacy_xml.rs +++ b/rust/pspp/src/spv/read/legacy_xml.rs @@ -653,11 +653,12 @@ impl Visualization { warn(LegacyXmlWarning::MissingData); } - for child in &graph.facet_layout.children { - let FacetLayoutChild::SetCellProperties(scp) = child else { - continue; - }; - + for scp in graph + .facet_layout + .children + .iter() + .filter_map(|child| child.set_cell_properties()) + { #[derive(Copy, Clone, Debug, PartialEq)] enum TargetType { Labeling, @@ -1826,6 +1827,12 @@ enum FacetLayoutChild { } impl FacetLayoutChild { + fn set_cell_properties(&self) -> Option<&SetCellProperties> { + match self { + Self::SetCellProperties(scp) => Some(scp), + _ => None, + } + } fn facet_level(&self) -> Option<&FacetLevel> { match self { Self::FacetLevel(facet_level) => Some(facet_level),