From dc54854b734b273719fdaf8fec8b8c4bde855599 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 19 May 2025 08:31:38 -0700 Subject: [PATCH] Revert "work" This reverts commit 70cdd62337513b91c2bba7d68138379c5e84edd0. --- rust/pspp/src/dictionary.rs | 14 ++++---------- rust/pspp/src/sys/raw.rs | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/rust/pspp/src/dictionary.rs b/rust/pspp/src/dictionary.rs index 0a93e0c639..d0e2080fd1 100644 --- a/rust/pspp/src/dictionary.rs +++ b/rust/pspp/src/dictionary.rs @@ -191,10 +191,7 @@ where } } -impl PartialEq for Value -where - S: PartialEq, -{ +impl PartialEq for Value { fn eq(&self, other: &Self) -> bool { match (self, other) { (Self::Number(Some(l0)), Self::Number(Some(r0))) => { @@ -207,7 +204,7 @@ where } } -impl Eq for Value where S: Eq {} +impl Eq for Value {} impl PartialOrd for Value { fn partial_cmp(&self, other: &Self) -> Option { @@ -231,10 +228,7 @@ impl Ord for Value { } } -impl Hash for Value -where - S: Hash, -{ +impl Hash for Value { fn hash(&self, state: &mut H) { match self { Value::Number(number) => number.map(OrderedFloat).hash(state), @@ -669,7 +663,7 @@ pub struct Variable { /// Value labels, to associate a number (or a string) with a more meaningful /// description, e.g. 1 -> Apple, 2 -> Banana, ... - pub value_labels: HashMap, String>, + pub value_labels: HashMap, /// Variable label, an optional meaningful description for the variable /// itself. diff --git a/rust/pspp/src/sys/raw.rs b/rust/pspp/src/sys/raw.rs index 5fb598954f..18daf2cef7 100644 --- a/rust/pspp/src/sys/raw.rs +++ b/rust/pspp/src/sys/raw.rs @@ -1558,7 +1558,7 @@ impl Debug for RawStrArray { /// have the same contents. This is an important optimization for hashing: /// otherwise, strings could only be hashed if they were converted to a common /// encoding (probably UTF-8), which would be expensive. -#[derive(Clone, Eq, Hash)] +#[derive(Clone)] pub struct EncodedString { /// Raw contents. bytes: RawString, -- 2.30.2