Skip to main content

write_lines

Function write_lines 

Source
pub fn write_lines(
    lines: impl IntoIterator<Item = impl AsRef<str>>,
) -> Result<()>
Expand description

Writes many short lines under a single stdout lock (list/doctor/text dumps).

Batches under BufWriter then a single flush (not per-line flush). Prefer direct writeln! into a locked BufWriter when building lines with formatting (avoids a Vec<String> of format! results — G-MAC-02).

§Errors

Propagates I/O errors including BrokenPipe.