|
|
|
@ -37,16 +37,12 @@ impl Task {
|
|
|
|
|
pub fn compare(&self, other: &Self) -> Ordering {
|
|
|
|
|
if self.is_base() && other.is_custom() {
|
|
|
|
|
Ordering::Less
|
|
|
|
|
} else if self.is_custom() && other.is_base() {
|
|
|
|
|
} else if self.is_custom() && other.is_base() || self.order() > other.order() {
|
|
|
|
|
Ordering::Greater
|
|
|
|
|
} else if self.order() < other.order() {
|
|
|
|
|
Ordering::Less
|
|
|
|
|
} else {
|
|
|
|
|
if self.order() > other.order() {
|
|
|
|
|
Ordering::Greater
|
|
|
|
|
} else if self.order() < other.order() {
|
|
|
|
|
Ordering::Less
|
|
|
|
|
} else {
|
|
|
|
|
Ordering::Equal
|
|
|
|
|
}
|
|
|
|
|
Ordering::Equal
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|