Moved user_provided_filename to be contained within OrdinaryFile struct

This commit is contained in:
Kyle Criddle
2020-04-04 18:49:55 -06:00
committed by David Peter
parent a3f8140fbe
commit 04fa84aea7
9 changed files with 143 additions and 127 deletions

View File

@ -1,6 +1,6 @@
/// A simple program that prints its own source code using the bat library
use bat::{
config::{Config, InputFile},
config::{Config, InputFile, OrdinaryFile},
Controller, HighlightingAssets,
};
use std::ffi::OsStr;
@ -9,7 +9,10 @@ fn main() {
let path_to_this_file = OsStr::new(file!());
let config = Config {
files: vec![InputFile::Ordinary(path_to_this_file)],
files: vec![InputFile::Ordinary(OrdinaryFile::new(
path_to_this_file,
None,
))],
colored_output: true,
true_color: true,
..Default::default()