Skip to main content

format

Function format 

Source
pub fn format(source: &str, config: &FmtConfig) -> String
Expand description

Format source, returning the tidied text. In safe_mode (the default) this returns source unchanged rather than risk a meaning-changing edit (a syntax error in the input, or output whose significant tokens differ from the input’s).