This commit is contained in:
Oliver Schneider 2016-04-26 17:06:08 +02:00
parent 6edc6a13d4
commit ba8653a8da
No known key found for this signature in database
GPG key ID: 56D6EEA0FC67AC46

View file

@ -164,6 +164,7 @@ impl PartialOrd for Constant {
}
}
(&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 @@ impl PartialOrd for Constant {
x => x,
}
}
(&Constant::Tuple(ref l), &Constant::Tuple(ref r)) => l.partial_cmp(r),
_ => None, //TODO: Are there any useful inter-type orderings?
}
}