]> git.lizzy.rs Git - rust.git/commitdiff
fallout
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Tue, 26 Apr 2016 15:06:08 +0000 (17:06 +0200)
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Mon, 9 May 2016 11:08:00 +0000 (13:08 +0200)
src/consts.rs

index 248b5bfe9e6e1588c3fc27ef6c000b6ab9bc386f..96956d1793b6fafcde17dd1b6ed4e9633d9693fc 100644 (file)
@@ -164,6 +164,7 @@ fn partial_cmp(&self, other: &Constant) -> Option<Ordering> {
                 }
             }
             (&Constant::Bool(ref l), &Constant::Bool(ref r)) => Some(l.cmp(r)),
+            (&Constant::Tuple(ref l), &Constant::Tuple(ref r)) |
             (&Constant::Vec(ref l), &Constant::Vec(ref r)) => l.partial_cmp(r),
             (&Constant::Repeat(ref lv, ref ls), &Constant::Repeat(ref rv, ref rs)) => {
                 match lv.partial_cmp(rv) {
@@ -171,7 +172,6 @@ fn partial_cmp(&self, other: &Constant) -> Option<Ordering> {
                     x => x,
                 }
             }
-            (&Constant::Tuple(ref l), &Constant::Tuple(ref r)) => l.partial_cmp(r),
             _ => None, //TODO: Are there any useful inter-type orderings?
         }
     }