mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-10-06 17:21:29 +00:00
bug: fix issues with macos and windows during refactor
This commit is contained in:
1 parent
05e9cd4d4d
commit
ba362f81c9
12 files changed
+84
-29
No files matched your search
@@ -116,6 +116,7 @@ pub fn partial_ordering_rev<T: std::cmp::PartialOrd>(a: T, b: T) -> Ordering {
|
||||
pub fn get_ordering<T: std::cmp::PartialOrd>(
|
||||
a_val: T, b_val: T, reverse_order: bool,
|
||||
) -> std::cmp::Ordering {
|
||||
// FIXME: Maybe we can just delete this entirely and change references to use partial_ordering...
|
||||
match a_val.partial_cmp(&b_val) {
|
||||
Some(x) => match x {
|
||||
Ordering::Greater => {
|
||||
@@ -137,3 +138,23 @@ pub fn get_ordering<T: std::cmp::PartialOrd>(
|
||||
None => Ordering::Equal,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
// use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_sort_partial_fn() {
|
||||
// FIXME: Do this
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_partial_ordering() {
|
||||
// FIXME: Do this
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_reverse_partial_ordering() {
|
||||
// FIXME: Do this
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user