get rid of pub use value::Value;
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 11 Dec 2025 17:35:16 +0000 (09:35 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 11 Dec 2025 17:35:16 +0000 (09:35 -0800)
18 files changed:
rust/pspp/src/data.rs
rust/pspp/src/dictionary.rs
rust/pspp/src/output.rs
rust/pspp/src/output/pivot.rs
rust/pspp/src/output/pivot/output.rs
rust/pspp/src/output/pivot/tests.rs
rust/pspp/src/output/table.rs
rust/pspp/src/pc.rs
rust/pspp/src/por/read.rs
rust/pspp/src/spv/read.rs
rust/pspp/src/spv/read/html.rs
rust/pspp/src/spv/read/legacy_bin.rs
rust/pspp/src/spv/read/legacy_xml.rs
rust/pspp/src/spv/read/light.rs
rust/pspp/src/spv/write.rs
rust/pspp/src/sys/cooked.rs
rust/pspp/src/sys/raw.rs
rust/pspp/src/sys/tests.rs

index c2edc22f126e3343e2d3fe213d7314801882739f..e482841c376b25c5af36939270cd6e10bf414165 100644 (file)
@@ -48,7 +48,7 @@ use crate::{
     format::DisplayPlain,
     output::{
         Item, Text,
-        pivot::{Axis3, Dimension, Group, PivotTable, Value},
+        pivot::{Axis3, Dimension, Group, PivotTable, value::Value},
     },
     variable::{VarType, VarWidth},
 };
index 1f305636558c9abd7e1a19368ab332f678bd80a8..b5d631b98dd49edb3d10019b43957ca6d725159c 100644 (file)
@@ -38,7 +38,7 @@ use crate::{
     data::{ByteString, Datum, RawString},
     identifier::{ByIdentifier, HasIdentifier, Identifier},
     output::pivot::{
-        Axis3, Dimension, Display26Adic, Footnote, Footnotes, Group, PivotTable, Value,
+        Axis3, Dimension, Display26Adic, Footnote, Footnotes, Group, PivotTable, value::Value,
     },
     settings::Show,
     variable::{Attributes, VarWidth, Variable},
index 106616679d432aba0fa9f52c3a77de40b8e0a238..3133d61695e0777268da288241513cafce51613d 100644 (file)
@@ -40,11 +40,10 @@ use crate::{
     output::pivot::{
         Axis3, Dimension, Group,
         look::{BorderStyle, Look},
+        value::Value,
     },
 };
 
-use self::pivot::Value;
-
 pub mod drivers;
 pub mod page;
 pub mod pivot;
index f418636b176212ae1e04b8a835f9909511b23076..66596e6aa6b866339ea2dd6c7f2944acc05e5983 100644 (file)
@@ -59,10 +59,13 @@ use serde::{Deserialize, Serialize, ser::SerializeMap};
 use smallvec::SmallVec;
 
 use crate::{
-    format::{Format, Settings as FormatSettings, F40, F40_2, F40_3, PCT40_1},
-    output::pivot::{look::{Look, Sizing}, value::{
-        BareValue, DisplayValue, IntoValueOptions, NumberValue, ValueInner, ValueOptions,
-    }},
+    format::{F40, F40_2, F40_3, Format, PCT40_1, Settings as FormatSettings},
+    output::pivot::{
+        look::{Look, Sizing},
+        value::{
+            BareValue, DisplayValue, IntoValueOptions, NumberValue, Value, ValueInner, ValueOptions,
+        },
+    },
     settings::{Settings, Show},
     variable::Variable,
 };
@@ -71,9 +74,8 @@ pub(crate) use tlo::parse_bool;
 mod output;
 pub use output::OutputTables;
 mod look_xml;
-pub mod value;
-pub use value::Value;
 mod tlo;
+pub mod value;
 
 #[cfg(test)]
 pub mod tests;
@@ -194,7 +196,7 @@ impl PivotTable {
     }
 }
 
-/// Dimensions.
+/// A dimension.
 ///
 /// A [Dimension] identifies the categories associated with a single dimension
 /// within a multidimensional pivot table.
@@ -1575,10 +1577,10 @@ mod test {
     use std::str::FromStr;
 
     use crate::output::pivot::{
-        Display26Adic, MetadataEntry, MetadataValue, Value,
+        Display26Adic, MetadataEntry, MetadataValue,
         look::Color,
         tests::assert_rendering,
-        value::{TemplateValue, ValueInner},
+        value::{TemplateValue, Value, ValueInner},
     };
 
     #[test]
index 317da926e34d6beb07f3124a46ba8ee8238a0e37..25bf952301e9b636fff7855ad8a989889084342c 100644 (file)
@@ -28,9 +28,9 @@ use crate::output::{
 };
 
 use crate::output::pivot::{
-    Axis2, Axis3, Dimension, PivotTable, Value,
+    Axis2, Axis3, Dimension, PivotTable,
     look::{Area, Border, BorderStyle, BoxBorder, Color, RowColBorder, Stroke},
-    value::IntoValueOptions,
+    value::{IntoValueOptions, Value},
 };
 
 /// All of the combinations of dimensions along an axis.
index 8149b4fd435c69b42c6c74330b3eb7a69c7361b9..ad73c77a9c586efaf4c9a7f2311c9a6effec1c4a 100644 (file)
@@ -36,7 +36,7 @@ use crate::output::{
     },
 };
 
-use super::{Axis3, Value};
+use super::{Axis3, value::Value};
 
 #[test]
 fn color() {
index eb9b7d04bb9630f83656cef897adca35d625de70..4bf2c26f839ceb83feadd3f13af219c89e820954 100644 (file)
@@ -37,11 +37,11 @@ use ndarray::{Array, Array2};
 
 use crate::{
     output::pivot::{
-        Axis2, Footnote, Value,
+        Axis2, Footnote,
         look::{
             Area, AreaStyle, Border, BorderStyle, CellStyle, FontStyle, HeadingRegion, HorzAlign,
         },
-        value::{DisplayValue, ValueInner, ValueOptions},
+        value::{DisplayValue, Value, ValueInner, ValueOptions},
     },
     spv::html,
 };
index 9627f29aa6850ff72b4fdfd74bbdd85aeaa4957b..0031452ded79e15f7003aea25e3ca5f0bad35086 100644 (file)
@@ -45,7 +45,7 @@ use crate::{
     dictionary::Dictionary,
     format::{Error as FormatError, Format, UncheckedFormat},
     identifier::{Error as IdError, Identifier},
-    output::pivot::{MetadataEntry, MetadataValue, PivotTable, Value},
+    output::pivot::{MetadataEntry, MetadataValue, PivotTable, value::Value},
     sys::raw::{self, CaseDetails, CaseVar, CompressionAction, records::RawFormat},
     variable::{MissingValues, MissingValuesError, VarWidth, Variable},
 };
index 1bb4c809946154e16dd928d153f1aa1e21e6a2b4..cf79fc8f8789a6406a12d9d22d06894a978b3547 100644 (file)
@@ -35,7 +35,7 @@ use crate::{
     dictionary::{DictIndex, Dictionary},
     format::{Error as FormatError, Format, Type, UncheckedFormat},
     identifier::{Error as IdError, Identifier},
-    output::pivot::{MetadataEntry, MetadataValue, PivotTable, Value},
+    output::pivot::{MetadataEntry, MetadataValue, PivotTable, value::Value},
     por::portable_to_windows_1252,
     variable::{MissingValueRange, MissingValues, MissingValuesError, VarType, VarWidth, Variable},
 };
index fc2b0fff03e3b63e80a204bf40e2260d64ddebde..05b7063bb990ded4b28b1fdd5f2754d39194d658 100644 (file)
@@ -32,7 +32,7 @@ use crate::{
     crypto::EncryptedFile,
     output::{
         Details, Item, SpvInfo, SpvMembers, Text, page,
-        pivot::{Axis2, Length, TableProperties, Value, look::Look},
+        pivot::{Axis2, Length, TableProperties, look::Look, value::Value},
     },
     spv::read::{
         html::Document,
index 39a01351d0540deabbb998bca70018b461f8f8c5..eefeea481d5777c21c1e2bc2c96fdf8422fe2ffa 100644 (file)
@@ -40,8 +40,8 @@ use quick_xml::{
 use serde::{Deserialize, Deserializer, Serialize, ser::SerializeMap};
 
 use crate::output::pivot::{
-    Value,
     look::{CellStyle, Color, FontStyle, HorzAlign},
+    value::Value,
 };
 
 fn lowercase<'a>(s: &'a str) -> Cow<'a, str> {
index 07fca9ee99fb0287cef08c7fbaa644cc1d5ad6b8..673df36072374434dcdc1c6c612ceb0ea4f118a3 100644 (file)
@@ -11,7 +11,7 @@ use crate::{
     calendar::{date_time_to_pspp, time_to_pspp},
     data::Datum,
     format::{Category, Format},
-    output::pivot::Value,
+    output::pivot::value::Value,
     spv::read::light::{U32String, decode_format, parse_vec},
 };
 
index f926961d956b5056a92d57afa0a0c3ab40b51031..b1e077c1ee7c78bc51381f1fa74c8303d27b7139 100644 (file)
@@ -36,12 +36,11 @@ use crate::{
     format::{self, Decimal::Dot, F8_0, F40_2, Type, UncheckedFormat},
     output::pivot::{
         self, Axis2, Axis3, Category, CategoryLocator, Dimension, Group, Leaf, Length, PivotTable,
-        Value,
         look::{
             self, Area, AreaStyle, CellStyle, Color, HeadingRegion, HorzAlign, Look, RowParity,
             VertAlign,
         },
-        value::{NumberValue, ValueInner},
+        value::{NumberValue, Value, ValueInner},
     },
     spv::read::legacy_bin::DataValue,
 };
index 39cdbe031f7838f432459d5456145fab98ded601..f47987dbdb6491e2df8b029d22931d86a2ce8cd5 100644 (file)
@@ -28,7 +28,7 @@ use crate::{
             RowColBorder, RowParity, Stroke, VertAlign,
         },
         parse_bool,
-        value::{StringValue, TemplateValue, ValueStyle, VariableValue},
+        value::{self, StringValue, TemplateValue, ValueStyle, VariableValue},
     },
     settings::Show,
 };
@@ -1198,15 +1198,15 @@ fn parse_format() -> BinResult<Format> {
 }
 
 impl ValueNumber {
-    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> pivot::Value {
-        pivot::Value::new_number_with_format((self.x != -f64::MAX).then_some(self.x), self.format)
+    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> value::Value {
+        value::Value::new_number_with_format((self.x != -f64::MAX).then_some(self.x), self.format)
             .with_styling(ValueMods::decode_optional(&self.mods, encoding, footnotes))
     }
 }
 
 impl ValueVarNumber {
-    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> pivot::Value {
-        pivot::Value::new_number_with_format((self.x != -f64::MAX).then_some(self.x), self.format)
+    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> value::Value {
+        value::Value::new_number_with_format((self.x != -f64::MAX).then_some(self.x), self.format)
             .with_styling(ValueMods::decode_optional(&self.mods, encoding, footnotes))
             .with_value_label(self.value_label.decode_optional(encoding))
             .with_variable_name(Some(self.var_name.decode(encoding)))
@@ -1215,8 +1215,8 @@ impl ValueVarNumber {
 }
 
 impl ValueText {
-    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> pivot::Value {
-        pivot::Value::new_general_text(
+    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> value::Value {
+        value::Value::new_general_text(
             self.local.decode(encoding),
             self.c.decode(encoding),
             self.id.decode(encoding),
@@ -1227,8 +1227,8 @@ impl ValueText {
 }
 
 impl ValueString {
-    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> pivot::Value {
-        pivot::Value::new(pivot::value::ValueInner::String(StringValue {
+    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> value::Value {
+        value::Value::new(pivot::value::ValueInner::String(StringValue {
             s: self.s.decode(encoding),
             hex: self.format.type_() == Type::AHex,
             show: self.show,
@@ -1240,8 +1240,8 @@ impl ValueString {
 }
 
 impl ValueVarName {
-    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> pivot::Value {
-        pivot::Value::new(pivot::value::ValueInner::Variable(VariableValue {
+    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> value::Value {
+        value::Value::new(pivot::value::ValueInner::Variable(VariableValue {
             show: self.show,
             var_name: self.var_name.decode(encoding),
             variable_label: self.var_label.decode_optional(encoding),
@@ -1250,8 +1250,8 @@ impl ValueVarName {
     }
 }
 impl ValueFixedText {
-    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> pivot::Value {
-        pivot::Value::new_general_text(
+    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> value::Value {
+        value::Value::new_general_text(
             self.local.decode(encoding),
             self.c.decode(encoding),
             self.id.decode(encoding),
@@ -1262,8 +1262,8 @@ impl ValueFixedText {
 }
 
 impl ValueTemplate {
-    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> pivot::Value {
-        pivot::Value::new(pivot::value::ValueInner::Template(TemplateValue {
+    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> value::Value {
+        value::Value::new(pivot::value::ValueInner::Template(TemplateValue {
             args: self
                 .args
                 .iter()
@@ -1280,7 +1280,7 @@ impl ValueTemplate {
 }
 
 impl Value {
-    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> pivot::Value {
+    fn decode(&self, encoding: &'static Encoding, footnotes: &pivot::Footnotes) -> value::Value {
         match self {
             Value::Number(number) => number.decode(encoding, footnotes),
             Value::VarNumber(var_number) => var_number.decode(encoding, footnotes),
@@ -1328,7 +1328,7 @@ impl Argument {
         &self,
         encoding: &'static Encoding,
         footnotes: &pivot::Footnotes,
-    ) -> Vec<pivot::Value> {
+    ) -> Vec<value::Value> {
         self.0
             .iter()
             .map(|value| value.decode(encoding, footnotes))
index 1798874d0e4cd3c35b407ceb6ad8be9c39c2013b..89a36d3362f641c65dcd185f297b1591048f73d9 100644 (file)
@@ -36,13 +36,13 @@ use crate::{
         page::{ChartSize, PageSetup},
         pivot::{
             Axis2, Axis3, Category, Dimension, Footnote, FootnoteMarkerPosition,
-            FootnoteMarkerType, Footnotes, Group, Leaf, PivotTable, Value,
+            FootnoteMarkerType, Footnotes, Group, Leaf, PivotTable,
             look::{
                 Area, AreaStyle, Border, BorderStyle, BoxBorder, CellStyle, Color, FontStyle,
                 HeadingRegion, HorzAlign, LabelPosition, RowColBorder, RowParity, Stroke,
                 VertAlign,
             },
-            value::{ValueInner, ValueStyle},
+            value::{Value, ValueInner, ValueStyle},
         },
     },
     settings::Show,
index dfe40a1ce6f2d16debf5b55c5baab02f2d040129..fc850837aac0ee351d48252e8e8bc01fd4021834 100644 (file)
@@ -33,7 +33,7 @@ use crate::{
     format::{Error as FormatError, Format, UncheckedFormat},
     hexfloat::HexFloat,
     identifier::{Error as IdError, Identifier},
-    output::pivot::{Axis3, Dimension, Group, PivotTable, Value},
+    output::pivot::{Axis3, Dimension, Group, PivotTable, value::Value},
     sys::{
         raw::{
             self, CaseDetails, DecodedRecord, RawCases, RawDatum, RawWidth, Reader, infer_encoding,
index 00779f054fb3c00ecfef8c98e4c342387085d9a0..4519bf2de5e24ae0667531c3d4909a4b177d321b 100644 (file)
@@ -25,7 +25,7 @@ use crate::{
     identifier::{Error as IdError, Identifier},
     output::{
         Details, Item, Text,
-        pivot::{Axis3, Dimension, Group, PivotTable, Value},
+        pivot::{Axis3, Dimension, Group, PivotTable, value::Value},
     },
     sys::{
         encoding::{Error as EncodingError, default_encoding, get_encoding},
index d394c0a9f1290eaad61b3faa584e6c9b78392588..3e2afa36614c016b5c530f5c89017dc7605199fb 100644 (file)
@@ -31,7 +31,7 @@ use crate::{
     identifier::Identifier,
     output::{
         Item, Text,
-        pivot::{Axis3, Dimension, Group, PivotTable, Value, tests::assert_lines_eq},
+        pivot::{Axis3, Dimension, Group, PivotTable, tests::assert_lines_eq, value::Value},
     },
     sys::{
         WriteOptions,