summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-08-14 20:40:29 +1000
committerGitHub <noreply@github.com>2020-08-14 12:40:29 +0200
commit27d896984726d12bdec1007bd998731f08dc86ff (patch)
tree507f540416b522ac8040ded28142e6c4fdc3572b
parentb38c3132768e0f5132763db9c8fdc2a4a9490bde (diff)
chore: nightly clippy refactor in lint.rs (#7045)
-rw-r--r--cli/lint.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/cli/lint.rs b/cli/lint.rs
index bf6dc16b6..4e12d582c 100644
--- a/cli/lint.rs
+++ b/cli/lint.rs
@@ -278,9 +278,7 @@ impl LintReporter for JsonLintReporter {
fn close(&mut self) {
// Sort so that we guarantee a deterministic output which is useful for tests
- self
- .diagnostics
- .sort_by(|a, b| get_sort_key(&a).cmp(&get_sort_key(&b)));
+ self.diagnostics.sort_by_key(|key| get_sort_key(&key));
let json = serde_json::to_string_pretty(&self);
eprintln!("{}", json.unwrap());