Moved user_provided_filename to be contained within OrdinaryFile struct

This commit is contained in:
Kyle Criddle authored and David Peter committed 2020-04-21 08:57:15 +02:00
1 parent a3f8140fbe
commit 04fa84aea7
9 files changed
+143 -127

No files matched your search

+5 -2
View File
@@ -1,7 +1,7 @@
/// A very simple colorized `cat` clone, using `bat` as a library.
/// See `src/bin/bat` for the full `bat` application.
use bat::{
config::{Config, InputFile, StyleComponent, StyleComponents},
config::{Config, InputFile, OrdinaryFile, StyleComponent, StyleComponents},
Controller, HighlightingAssets,
};
use console::Term;
@@ -24,7 +24,10 @@ fn main() {
StyleComponent::Grid,
StyleComponent::Numbers,
]),
files: files.iter().map(|file| InputFile::Ordinary(file)).collect(),
files: files
.iter()
.map(|file| InputFile::Ordinary(OrdinaryFile::new(file, None)))
.collect(),
..Default::default()
};
let assets = HighlightingAssets::from_binary();