Skip to main content

format_unit

Function format_unit 

Source
pub fn format_unit(unit: &SourceUnit) -> String
Expand description

Formats one parsed source unit deterministically.

The tree does not carry // and /* */ comments or the blank lines between statements, so this function cannot reproduce them. Use format_source to format a unit together with the text it was parsed from, which is what cove fmt does.