Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r--helix-view/src/document.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 412f79fa..f3ace89e 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -99,7 +99,6 @@ impl Serialize for Mode {
serializer.collect_str(self)
}
}
-
/// A snapshot of the text of a document that we want to write out to disk
#[derive(Debug, Clone)]
pub struct DocumentSavedEvent {
@@ -1321,7 +1320,7 @@ impl Document {
true
});
- self.diagnostics.sort_unstable_by_key(|diagnostic| {
+ self.diagnostics.sort_by_key(|diagnostic| {
(diagnostic.range, diagnostic.severity, diagnostic.provider)
});
@@ -1911,9 +1910,8 @@ impl Document {
});
}
self.diagnostics.extend(diagnostics);
- self.diagnostics.sort_unstable_by_key(|diagnostic| {
- (diagnostic.range, diagnostic.severity, diagnostic.provider)
- });
+ self.diagnostics
+ .sort_by_key(|diagnostic| (diagnostic.range, diagnostic.severity, diagnostic.provider));
}
/// clears diagnostics for a given language server id if set, otherwise all diagnostics are cleared