Skip to main content

format_line

Function format_line 

Source
pub fn format_line(line: &str) -> String
Expand description

Format a single line: normalize leading whitespace (tab → 4 spaces) and strip trailing whitespace. Content between the indent and the trailing whitespace is untouched. Line-local — the on-type formatting rule; the whole-document format_source adds structure awareness on top.