Files
Rack/src/filematch.rs
Cameron Cordes 276db68727 Fix lint issues
2020-05-22 16:17:03 -04:00

32 lines
560 B
Rust

use super::config::Config;
use super::printer::*;
#[derive(Debug)]
pub struct FileMatch {
pub file_name: String,
pub matches: Vec<Match>,
}
impl FileMatch {
pub fn print(&self, config: &Config) {
let cp = ColorPrinter {
config,
file_match: self,
};
cp.print();
}
}
#[derive(Debug, Clone)]
pub struct Match {
pub line_number: usize,
pub match_indexes: Vec<MatchIndex>,
pub text: String,
}
#[derive(Debug, Clone)]
pub struct MatchIndex {
pub start: usize,
pub end: usize,
}