format_dir

Function format_dir 

Source
pub fn format_dir<P: AsRef<Path>>(
    dir_path: P,
    write: bool,
) -> Result<FormattingStats>
Expand description

Format all supported files in a directory

§Arguments

  • dir_path - Path to the directory to format
  • write - Whether to write the formatted output back to the files

§Returns

  • Ok(FormattingStats) - Statistics about the formatting operation
  • Err - If formatting failed