2020-03-21 21:45:03 +01:00
|
|
|
/// A simple program that prints its own source code using the bat library
|
2020-04-21 19:08:19 +02:00
|
|
|
use bat::PrettyPrinter;
|
2020-03-21 21:45:03 +01:00
|
|
|
use std::ffi::OsStr;
|
2019-10-20 21:53:34 +02:00
|
|
|
|
|
|
|
fn main() {
|
2020-03-21 21:45:03 +01:00
|
|
|
let path_to_this_file = OsStr::new(file!());
|
2019-10-20 21:53:34 +02:00
|
|
|
|
2020-04-21 21:29:47 +02:00
|
|
|
PrettyPrinter::new()
|
|
|
|
.input_file(path_to_this_file)
|
2020-04-22 20:33:19 +02:00
|
|
|
.print()
|
2020-04-21 21:29:47 +02:00
|
|
|
.expect("no errors");
|
2019-10-20 21:53:34 +02:00
|
|
|
}
|