1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

chore: nightly clippy refactor in lint.rs (#7045)

This commit is contained in:
Kitson Kelly 2020-08-14 20:40:29 +10:00 committed by GitHub
parent b38c313276
commit 27d8969847
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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());