summary refs log tree commit diff stats
path: root/tests/common/mod.rs
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2021-02-07 22:19:21 -0300
committerSoniEx2 <endermoneymod@gmail.com>2021-02-07 22:20:34 -0300
commit69652efe8ad9738a94fef571c8b81e342f96e7b4 (patch)
tree9b02efcb139894ac3b5df2667be313f2a9df4319 /tests/common/mod.rs
parentd81ce99e0d1f1371ba9165a67280a810ee27bf82 (diff)
Finish porting parser
Diffstat (limited to 'tests/common/mod.rs')
-rw-r--r--tests/common/mod.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index 48153af..9680504 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -24,7 +24,7 @@ use datafu::RefOwn;
 use datafu::PatternTypes;
 use datafu::KVPair;
 
-#[derive(PartialEq, Eq, PartialOrd, Ord)]
+#[derive(PartialEq, Eq, PartialOrd, Ord, Debug)]
 pub enum Value {
     U(usize),
     B(bool),
@@ -32,7 +32,7 @@ pub enum Value {
     S(Cow<'static, str>),
 }
 
-#[derive(Copy, Clone, Eq, PartialEq)]
+#[derive(Copy, Clone, Eq, PartialEq, Debug)]
 pub enum Dummy {
 }
 
@@ -66,24 +66,28 @@ impl PartialEq<Value> for str {
 
 impl PartialEq<Dummy> for Value {
     fn eq(&self, other: &Dummy) -> bool {
+        let _ = other;
         unreachable!()
     }
 }
 
 impl PartialEq<Value> for Dummy {
     fn eq(&self, other: &Value) -> bool {
+        let _ = other;
         unreachable!()
     }
 }
 
 impl PartialEq<str> for Dummy {
     fn eq(&self, other: &str) -> bool {
+        let _ = other;
         unreachable!()
     }
 }
 
 impl PartialEq<Dummy> for str {
     fn eq(&self, other: &Dummy) -> bool {
+        let _ = other;
         unreachable!()
     }
 }
@@ -158,7 +162,7 @@ impl PatternTypes for Value {
             RefOwn::Ref(Value::M(map)) => {
                 Some(match key {
                     RefOwn::Ref(key) => map.get_key_value(key),
-                    RefOwn::Own(key) => unreachable!(),//map.get_key_value(&Value::U(key)),
+                    RefOwn::Own(_key) => unreachable!(),
                     RefOwn::Str(key) => map.get_key_value(&key as &dyn ValueHelper),
                 }.map(|(k,v)| (k.into(), v.into())))
             },