diff options
Diffstat (limited to 'examples/cat.rs')
-rw-r--r-- | examples/cat.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/cat.rs b/examples/cat.rs index c529bd6a..c1c9b242 100644 --- a/examples/cat.rs +++ b/examples/cat.rs @@ -4,16 +4,14 @@ use bat::{PrettyPrinter, StyleComponent, StyleComponents}; use console::Term; fn main() { - let mut printer = PrettyPrinter::new(); - - printer + PrettyPrinter::new() .term_width(Term::stdout().size().1 as usize) .style_components(StyleComponents::new(&[ StyleComponent::Header, StyleComponent::Grid, StyleComponent::Numbers, ])) - .files(std::env::args_os().skip(1)); - - printer.run().expect("no errors"); + .input_files(std::env::args_os().skip(1)) + .run() + .expect("no errors"); } |