Emit an UpdateDiagnostics from Worktree when buffer diagnostics change

This commit is contained in:
Antonio Scandurra 2021-12-23 09:57:50 +01:00
parent c47340000d
commit 9164c5f239
3 changed files with 34 additions and 11 deletions

View file

@ -78,7 +78,7 @@ pub struct DiagnosticSummary {
}
impl DiagnosticSummary {
fn new<T>(diagnostics: &[DiagnosticEntry<T>]) -> Self {
fn new<'a, T: 'a>(diagnostics: impl IntoIterator<Item = &'a DiagnosticEntry<T>>) -> Self {
let mut this = Self {
error_count: 0,
warning_count: 0,