From: Ben Pfaff Date: Mon, 11 Aug 2025 20:25:55 +0000 (-0700) Subject: work X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d3b716cc489131deb1d2fa4fb55a1c07f29b584;p=pspp work --- diff --git a/rust/pspp/src/dictionary.rs b/rust/pspp/src/dictionary.rs index e01e8af5b5..035c8425c6 100644 --- a/rust/pspp/src/dictionary.rs +++ b/rust/pspp/src/dictionary.rs @@ -826,11 +826,15 @@ impl<'a> OutputValueLabels<'a> { } values.push(group); } - let mut pt = PivotTable::new([(Axis3::Y, Dimension::new(values))]); - for (row, datum) in data.into_iter().enumerate() { - pt.insert(&[row], datum); - } - Some(pt) + Some( + PivotTable::new([(Axis3::Y, Dimension::new(values))]) + .with_title("Value Labels") + .with_data( + data.into_iter() + .enumerate() + .map(|(row, datum)| ([row], datum)), + ), + ) } } diff --git a/rust/pspp/src/sys/testdata/bad_variable_name_in_long_string_value_label.expected b/rust/pspp/src/sys/testdata/bad_variable_name_in_long_string_value_label.expected index d276b3a58c..acdbb3f5a3 100644 --- a/rust/pspp/src/sys/testdata/bad_variable_name_in_long_string_value_label.expected +++ b/rust/pspp/src/sys/testdata/bad_variable_name_in_long_string_value_label.expected @@ -23,6 +23,7 @@ Ignoring long string value label for numeric variable NUM1. │str14│ 2│ │Nominal │Input│ 14│Left │A14 │A14 │ │ ╰─────┴────────┴─────┴─────────────────┴─────┴─────┴─────────┴────────────┴────────────┴──────────────╯ + Value Labels ╭─────────────────────────────┬────────────────────────────────────────╮ │Variable Value │ │ ├─────────────────────────────┼────────────────────────────────────────┤ diff --git a/rust/pspp/src/sys/testdata/duplicate_value_labels_type.expected b/rust/pspp/src/sys/testdata/duplicate_value_labels_type.expected index 5552bcc73c..010bb05806 100644 --- a/rust/pspp/src/sys/testdata/duplicate_value_labels_type.expected +++ b/rust/pspp/src/sys/testdata/duplicate_value_labels_type.expected @@ -23,6 +23,7 @@ NUM1 has duplicate value labels for the following value(s): 1 │num1│ 2│ │ │Input│ 8│Right │F8.0 │F8.0 │ │ ╰────┴────────┴─────┴─────────────────┴─────┴─────┴─────────┴────────────┴────────────┴──────────────╯ + Value Labels ╭─────────────────────┬───╮ │Variable Value │ │ ├─────────────────────┼───┤ diff --git a/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected b/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected index 5359293d07..1cad5bffd3 100644 --- a/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected +++ b/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected @@ -25,6 +25,7 @@ This system file does not indicate its own character encoding. For best results │VAR00004│ 4│ │Nominal │Input│ 8│Left │A1 │A1 │ │ ╰────────┴────────┴─────┴─────────────────┴─────┴─────┴─────────┴────────────┴────────────┴──────────────╯ + Value Labels ╭───────────────────┬──────────╮ │Variable Value │ │ ├───────────────────┼──────────┤ diff --git a/rust/pspp/src/sys/testdata/test-encrypted.expected b/rust/pspp/src/sys/testdata/test-encrypted.expected index 9ec16fbd07..ef4bf38a55 100644 --- a/rust/pspp/src/sys/testdata/test-encrypted.expected +++ b/rust/pspp/src/sys/testdata/test-encrypted.expected @@ -23,6 +23,7 @@ │There was too much noise in the rooms │ 5│There was too much noise in the rooms │Ordinal │Input│ 8│Right │F8.0 │F8.0 │ │ ╰────────────────────────────────────────────────────┴────────┴────────────────────────────────────────────────────┴─────────────────┴─────┴─────┴─────────┴────────────┴────────────┴──────────────╯ + Value Labels ╭──────────────────────────────────────────────────────┬─────────────────╮ │Variable Value │ │ ├──────────────────────────────────────────────────────┼─────────────────┤ diff --git a/rust/pspp/src/sys/testdata/value_labels.expected b/rust/pspp/src/sys/testdata/value_labels.expected index 8f865a90ee..50932daee1 100644 --- a/rust/pspp/src/sys/testdata/value_labels.expected +++ b/rust/pspp/src/sys/testdata/value_labels.expected @@ -36,6 +36,7 @@ │str17│ 17│ │Nominal │Input│ 17│Left │A17 │A17 │ │ ╰─────┴────────┴─────┴─────────────────┴─────┴─────┴─────────┴────────────┴────────────┴──────────────╯ + Value Labels ╭────────────────────────────────┬───────────────────────────────────────────────────────────────╮ │Variable Value │ │ ├────────────────────────────────┼───────────────────────────────────────────────────────────────┤ diff --git a/rust/pspp/src/sys/testdata/variables_for_value_label_must_all_be_same_type.expected b/rust/pspp/src/sys/testdata/variables_for_value_label_must_all_be_same_type.expected index 6ffdf78056..4302cc3c62 100644 --- a/rust/pspp/src/sys/testdata/variables_for_value_label_must_all_be_same_type.expected +++ b/rust/pspp/src/sys/testdata/variables_for_value_label_must_all_be_same_type.expected @@ -21,6 +21,7 @@ Warning at file offsets 0x110 to 0x118: In value label record: First variable in │num1│ 2│ │ │Input│ 8│Right │F8.0 │F8.0 │ │ ╰────┴────────┴─────┴─────────────────┴─────┴─────┴─────────┴────────────┴────────────┴──────────────╯ + Value Labels ╭─────────────────────┬───╮ │Variable Value │ │ ├─────────────────────┼───┤