Skip to content

Commit

Permalink
Sort stats by language name for good. Fixes crossbeam-rs#397
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielesvelto authored and chmanchester committed Apr 10, 2019
1 parent 8cdce75 commit 6bd19d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ impl ServerStats {
($vec:ident, $var:expr, $name:expr) => {{
$vec.push(($name.to_string(), $var.all().to_string(), 0));
let mut sorted_stats: Vec<_> = $var.counts.iter().collect();
sorted_stats.sort_by_key(|v| v.1);
sorted_stats.sort_by_key(|v| v.0);
for (lang, count) in sorted_stats.iter() {
$vec.push((format!("{} ({})", $name, lang), count.to_string(), 0));
};
Expand Down

0 comments on commit 6bd19d8

Please sign in to comment.