mirror of
https://github.com/sharkdp/bat
synced 2026-07-28 17:51:44 +00:00
Rename field name, new constructors
This commit is contained in:
+3
-1
@@ -265,7 +265,9 @@ impl App {
|
||||
if input.to_str().unwrap() == "-" {
|
||||
file_input.push(InputFile::StdIn(name));
|
||||
} else {
|
||||
file_input.push(InputFile::Ordinary(OrdinaryFile::new(input, name)))
|
||||
file_input.push(InputFile::Ordinary(OrdinaryFile::from_path_with_name(
|
||||
input, name,
|
||||
)))
|
||||
}
|
||||
}
|
||||
None => {}
|
||||
|
||||
+3
-4
@@ -167,10 +167,9 @@ fn run() -> Result<bool> {
|
||||
Ok(true)
|
||||
} else {
|
||||
let mut config = app.config()?;
|
||||
config.files = vec![InputFile::Ordinary(OrdinaryFile::new(
|
||||
OsStr::new("cache"),
|
||||
None,
|
||||
))];
|
||||
config.files = vec![InputFile::Ordinary(OrdinaryFile::from_path(OsStr::new(
|
||||
"cache",
|
||||
)))];
|
||||
|
||||
run_controller(&config)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user