diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/lint.rs | 4 |
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()); |