Impl FilePrinter for SimplePrinter ::print_file_custom()
This commit is contained in:
parent
f0c186f33b
commit
6455c45630
1 changed files with 13 additions and 0 deletions
|
@ -92,6 +92,19 @@ impl FilePrinter for SimplePrinter {
|
|||
}
|
||||
}
|
||||
|
||||
fn print_file_custom<F>(&self, file: Rc<RefCell<File>>, f: &F)
|
||||
where F: Fn(Rc<RefCell<File>>) -> String
|
||||
{
|
||||
let s = f(file);
|
||||
if self.debug {
|
||||
debug!("{:?}", s);
|
||||
} else if self.verbose {
|
||||
info!("{}", s);
|
||||
} else {
|
||||
info!("[File]: {}", s);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pub struct TablePrinter {
|
||||
|
|
Loading…
Reference in a new issue