Skip to main content

rewrite_lines

Function rewrite_lines 

Source
pub(crate) fn rewrite_lines(
    path: &Path,
    drop: impl Fn(&str) -> bool,
) -> Result<usize, String>
Expand description

A file of the calls’ kept but for the lines drop names: written beside under a hidden name (yours alone), then put in place, under its lock. Returns how many lines went.