From b76f5e72d44cdf5850268cc4a867516953436092 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 22 Apr 2020 21:46:01 +0200 Subject: [PATCH] Use unwrap --- examples/advanced.rs | 2 +- examples/cat.rs | 2 +- examples/simple.rs | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/advanced.rs b/examples/advanced.rs index 0c831fcf..e54a391c 100644 --- a/examples/advanced.rs +++ b/examples/advanced.rs @@ -13,5 +13,5 @@ fn main() { .wrapping_mode(WrappingMode::Character) .input_file(file!()) .print() - .expect("no errors"); + .unwrap(); } diff --git a/examples/cat.rs b/examples/cat.rs index a42ed8d0..ac26dab0 100644 --- a/examples/cat.rs +++ b/examples/cat.rs @@ -9,5 +9,5 @@ fn main() { .line_numbers(true) .input_files(std::env::args_os().skip(1)) .print() - .expect("no errors"); + .unwrap(); } diff --git a/examples/simple.rs b/examples/simple.rs index b7217d60..e18d3693 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -2,8 +2,5 @@ use bat::PrettyPrinter; fn main() { - PrettyPrinter::new() - .input_file(file!()) - .print() - .expect("no errors"); + PrettyPrinter::new().input_file(file!()).print().unwrap(); }