Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove unnecessary lifetimes on `Buffer::diagnostic_group` (#22698)
Michael Sloan1ef638d802e6
diff --git a/crates/language/src/buffer.rs b/crates/language/src/buffer.rsindex ec4196635fe..42cb95ce591 100644--- a/crates/language/src/buffer.rs+++ b/crates/language/src/buffer.rs@@ -4019,12 +4019,12 @@ impl BufferSnapshot {}/// Returns an iterator over the diagnostics for the given group.- pub fn diagnostic_group<'a, O>(- &'a self,+ pub fn diagnostic_group<O>(+ &self,group_id: usize,- ) -> impl 'a + Iterator<Item = DiagnosticEntry<O>>+ ) -> impl Iterator<Item = DiagnosticEntry<O>> + '_where- O: 'a + FromAnchor,+ O: FromAnchor + 'static,{self.diagnostics.iter()