on master help sign in
Use unwrap
commitb76f5e72d44cdf5850268cc4a867516953436092 authorsharkdp <davidpeter@web.de> dateWed 22 Apr 2020, 21:46 (7 years ago) parent702cb19
3 files changed+3−6
examples/advanced.rs+1−1 examples/cat.rs+1−1 examples/simple.rs+1−4
examples/advanced.rs+1−1
@@ -13,5 +13,5 @@ fn main() {
1313 .wrapping_mode(WrappingMode::Character)
1414 .input_file(file!())
1515 .print()
16− .expect("no errors");
16+ .unwrap();
1717}
examples/cat.rs+1−1
@@ -9,5 +9,5 @@ fn main() {
99 .line_numbers(true)
1010 .input_files(std::env::args_os().skip(1))
1111 .print()
12− .expect("no errors");
12+ .unwrap();
1313}
examples/simple.rs+1−4
@@ -2,8 +2,5 @@
22use bat::PrettyPrinter;
33
44fn main() {
5− PrettyPrinter::new()
6− .input_file(file!())
7− .print()
8− .expect("no errors");
5+ PrettyPrinter::new().input_file(file!()).print().unwrap();
96}