Extract most shared logic into SimplePrinter
This should hopefully allow for more command line options, like no color, omitting line number and file names for better scriptability.
This commit is contained in:
@@ -9,8 +9,11 @@ pub struct FileMatch {
|
||||
|
||||
impl FileMatch {
|
||||
pub fn print(&self, config: &Config) {
|
||||
let cp = ColorPrinter {};
|
||||
cp.print(&config, &self);
|
||||
let cp = ColorPrinter {
|
||||
config: config,
|
||||
file_match: self,
|
||||
};
|
||||
cp.print();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user