alpm_mtree::mtree::v2

Function content_line

Source
fn content_line(content: &str, line_nr: usize) -> String
Expand description

Return the nth line of a given file’s content.

§Panics

Panics if line_nr refers to a line, that does not exist in content. This is unlikely to ever happen, as the content is derived from a parsed file and therefore it is known that the specific line referenced by line_nr exists.