pub fn line_count_at_pos<P: AsRef<Path>>(path: P, pos: usize) -> Result<usize>
Examples found in repository?
src/pattern/content_pattern.rs (line 66)
61
62
63
64
65
66
67
68
69
70
    pub fn get_match_line_count(
        &self,
        path: &Path,
    ) -> Option<usize> {
        if let Ok(ContentSearchResult::Found { pos }) = self.needle.search(path) {
            line_count_at_pos(path, pos).ok()
        } else {
            None
        }
    }