mirror of
https://github.com/sharkdp/bat
synced 2026-08-06 19:21:43 +00:00
Run 'cargo fmt'
This commit is contained in:
+1
-3
@@ -250,9 +250,7 @@ impl App {
|
||||
.map(|values| values.collect());
|
||||
|
||||
let mut filenames_or_none: Box<dyn Iterator<Item = _>> = match filenames {
|
||||
Some(ref filenames) => {
|
||||
Box::new(filenames.iter().map(|name| Some(OsStr::new(*name))))
|
||||
}
|
||||
Some(ref filenames) => Box::new(filenames.iter().map(|name| Some(OsStr::new(*name)))),
|
||||
None => Box::new(std::iter::repeat(None)),
|
||||
};
|
||||
let files: Option<Vec<&OsStr>> = self.matches.values_of_os("FILE").map(|vs| vs.collect());
|
||||
|
||||
@@ -53,5 +53,6 @@ pub fn assets_from_cache_or_binary() -> Result<HighlightingAssets> {
|
||||
}
|
||||
}
|
||||
|
||||
Ok(HighlightingAssets::from_cache(&cache_dir).unwrap_or_else(|_| HighlightingAssets::from_binary()))
|
||||
Ok(HighlightingAssets::from_cache(&cache_dir)
|
||||
.unwrap_or_else(|_| HighlightingAssets::from_binary()))
|
||||
}
|
||||
|
||||
@@ -38,7 +38,8 @@ pub fn generate_config_file() -> bat::error::Result<()> {
|
||||
return Err(format!(
|
||||
"Unable to write config file to: {}",
|
||||
config_file.to_string_lossy()
|
||||
).into());
|
||||
)
|
||||
.into());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user