Skip to content

Commit

Permalink
Fix sort order for flat usage data
Browse files Browse the repository at this point in the history
I believed we needed to reverse the sort order from the default greatest to least to least to greatest for frontend display on the operator tools side, but that was actually already taken care of.
  • Loading branch information
jkilpatr authored Oct 17, 2023
1 parent 9cebae7 commit a790db7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion althea_types/src/user_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,6 @@ pub fn convert_map_to_flat_usage_data(input: HashMap<u64, Usage>) -> VecDeque<In
})
}
// we want this sorted from greatest to least so we do the cmp in reverse order
out.make_contiguous().sort_by(|a, b| b.index.cmp(&a.index));
out.make_contiguous().sort_by(|a, b| a.index.cmp(&b.index));
out
}

0 comments on commit a790db7

Please sign in to comment.