Skip to main content

fix_all_diagnostics

Function fix_all_diagnostics 

Source
pub fn fix_all_diagnostics(
    db: &mut dyn Db,
    diagnostics: Vec<Diagnostic>,
    applicability: Applicability,
    cancellation_token: &CancellationToken,
) -> Result<FixAllResults, Canceled>
Expand description

Applies the safe fixes for all diagnostics and writes the changed files back to disk.

Returns how many diagnostics were fixed along with the remaining, unfixed diagnostics.

§Panics

If the db’s system isn’t writable.