Skip to main content

fix_format_files

Function fix_format_files 

Source
pub fn fix_format_files(
    files: &[PathBuf],
    config: &FormatConfig,
) -> Result<usize>
Expand description

Fix formatting of pre-discovered files in place.

Unlike fix_format, this skips file discovery and config loading. Files with unsupported extensions are silently skipped. Returns the number of files that were reformatted.

§Errors

Returns an error if a file cannot be written.