Revert "work"
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 19 May 2025 15:31:38 +0000 (08:31 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 19 May 2025 15:31:38 +0000 (08:31 -0700)
This reverts commit 70cdd62337513b91c2bba7d68138379c5e84edd0.

rust/pspp/src/dictionary.rs
rust/pspp/src/sys/raw.rs

index 0a93e0c6397375dbd36b83dae61ddcc11703a520..d0e2080fd1fd77310dea8592eb3f074d1061fa3c 100644 (file)
@@ -191,10 +191,7 @@ where
     }
 }
 
-impl<S> PartialEq for Value<S>
-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<S> Eq for Value<S> where S: Eq {}
+impl Eq for Value {}
 
 impl PartialOrd for Value {
     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
@@ -231,10 +228,7 @@ impl Ord for Value {
     }
 }
 
-impl<S> Hash for Value<S>
-where
-    S: Hash,
-{
+impl Hash for Value {
     fn hash<H: std::hash::Hasher>(&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<Value<EncodedString>, String>,
+    pub value_labels: HashMap<Value, String>,
 
     /// Variable label, an optional meaningful description for the variable
     /// itself.
index 5fb598954f69b6cdd088e8cfd321e1b992ee35dc..18daf2cef709fb790eb938c0c3a2efd7fce8b24a 100644 (file)
@@ -1558,7 +1558,7 @@ impl<const N: usize> Debug for RawStrArray<N> {
 /// 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,