Skip to main content

remove_line

Function remove_line 

Source
pub fn remove_line(file_path: &Path, line_number: usize) -> Result<String>
Expand description

Remove the line at line_number (1-based) from file_path.

Writes the file back without that line. Returns the original line content.