mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 11:22:30 +01:00
Fix all lints that are new with Rust 1.54
They are all of the following type: https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
This commit is contained in:
@@ -25,7 +25,7 @@ pub fn clear_assets() {
|
||||
|
||||
pub fn assets_from_cache_or_binary(use_custom_assets: bool) -> Result<HighlightingAssets> {
|
||||
let cache_dir = PROJECT_DIRS.cache_dir();
|
||||
if let Some(metadata) = AssetsMetadata::load_from_folder(&cache_dir)? {
|
||||
if let Some(metadata) = AssetsMetadata::load_from_folder(cache_dir)? {
|
||||
if !metadata.is_compatible_with(crate_version!()) {
|
||||
return Err(format!(
|
||||
"The binary caches for the user-customized syntaxes and themes \
|
||||
@@ -42,7 +42,7 @@ pub fn assets_from_cache_or_binary(use_custom_assets: bool) -> Result<Highlighti
|
||||
}
|
||||
|
||||
let custom_assets = if use_custom_assets {
|
||||
HighlightingAssets::from_cache(&cache_dir).ok()
|
||||
HighlightingAssets::from_cache(cache_dir).ok()
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
Reference in New Issue
Block a user