From: Ben Pfaff Date: Sat, 3 Jan 2026 17:33:00 +0000 (-0800) Subject: cleanup X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ea9e4f66988a84173adfdbdaa54b9440491f007;p=pspp cleanup --- diff --git a/rust/pspp/src/spv/read/legacy_xml.rs b/rust/pspp/src/spv/read/legacy_xml.rs index 790726042a..ebb53f3d37 100644 --- a/rust/pspp/src/spv/read/legacy_xml.rs +++ b/rust/pspp/src/spv/read/legacy_xml.rs @@ -771,22 +771,18 @@ impl Series { fn with_affixes(self, affixes: Vec) -> Self { Self { affixes, ..self } } - fn add_affixes(&self, mut value: Value, footnotes: &pivot::Footnotes) -> Value { + + fn new_name(&self, dv: &DataValue, footnotes: &pivot::Footnotes) -> Value { + let mut name = Value::new_datum(self.map.lookup(dv)); for affix in &self.affixes { if let Some(index) = affix.defines_reference.checked_sub(1) && let Ok(index) = usize::try_from(index) && let Some(footnote) = footnotes.get(index) { - value.add_footnote(footnote); + name.add_footnote(footnote); } } - value - } - - fn new_name(&self, dv: &DataValue, footnotes: &pivot::Footnotes) -> Value { - let dv = self.map.lookup(dv); - let name = Value::new_datum(dv); - self.add_affixes(name, &footnotes) + name } }