Skip to main content

fmt_file

Function fmt_file 

Source
pub fn fmt_file<R: BufRead, W: Write>(
    input: R,
    output: &mut W,
    config: &FmtConfig,
) -> Result<()>
Expand description

Reformat text from input and write the result to output.

Text is processed paragraph by paragraph (paragraphs are separated by blank lines). Each paragraph’s words are reflowed to fit within the configured width using greedy line breaking.