ZIm/crates/diagnostics
dinocosta 67b3f80003 refactor: introduce diagnostics toolbar editor trait
This commit refactors the interaction between the diagnostics editors
(`BufferDiagnosticsEditor` and `ProjectDiagnosticsEditor`) so that,
instead of passing an optional enum to the `ToolbarControls` struct, as
well as the `DiagnosticBlock`, we pass a reference to a type that
implements a new trait, `DiagnosticsToolbarEditor`, which defines the
methods that the toolbar controls needs, namely:

- `include_warnings`
- `toggle_warnings`
- `has_stale_excerpts`
- `is_updating`
- `stop_updating`
- `refresh_diagnostics`
- `get_diagnostics_for_buffer`

This makes it so that both `ToolbarControls` and `DiagnosticBlock`
implementations don't need to be aware of the internal details of each
of the editors, as well as avoiding duplicating the
`DiagnosticsEditorHandle` enum.
2025-08-26 16:16:15 +01:00
..
src refactor: introduce diagnostics toolbar editor trait 2025-08-26 16:16:15 +01:00
Cargo.toml Remove redundant Cargo diagnostics settings (#36795) 2025-08-23 07:03:36 +00:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00