Skip to main content

Module files

Module files 

Source

Functionsยง

check_file
Check if a file needs formatting. Returns None if already formatted, or Some(unified_diff) if changes are needed.
format_file
Format a file on disk, returning the formatted text. Auto-detects format from the file extension.
format_file_with
Format a file with extra abbreviations from a project config.
format_in_place
Format a file in-place. Returns true if the file was changed.