summaryrefslogtreecommitdiff
path: root/src/cli.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2022-02-27 12:08:23 -0500
committerGitHub <noreply@github.com>2022-02-27 12:08:23 -0500
commit1403fe2b8ef26c84cd625bb6f550755f82f47576 (patch)
tree88e070c3d504742af532729c5eb9cd7c3c65c71d /src/cli.rs
parente44435c8f8646d18f12d26e37c3ebe9b83d7f0a3 (diff)
Use assets API from bat library instead of vendored code (#903)
Use assets API from bat library Fixes #895 Ref https://github.com/sharkdp/bat/issues/2026 Thanks @Enselic
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cli.rs b/src/cli.rs
index f9ea330..15efd15 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -2,6 +2,7 @@ use std::collections::{HashMap, HashSet};
use std::ffi::OsString;
use std::path::PathBuf;
+use bat::assets::HighlightingAssets;
use clap::{AppSettings, ColorChoice, FromArgMatches, IntoApp, Parser};
use lazy_static::lazy_static;
use syntect::highlighting::Theme as SyntaxTheme;
@@ -10,7 +11,7 @@ use syntect::parsing::SyntaxSet;
use crate::config::delta_unreachable;
use crate::git_config::{GitConfig, GitConfigEntry};
use crate::options;
-use crate::utils::bat::assets::HighlightingAssets;
+use crate::utils;
use crate::utils::bat::output::PagingMode;
#[derive(Parser)]
@@ -1130,7 +1131,7 @@ impl Opt {
I: IntoIterator,
I::Item: Into<OsString> + Clone,
{
- let assets = HighlightingAssets::new();
+ let assets = utils::bat::assets::load_highlighting_assets();
Self::from_clap_and_git_config(Self::into_app().get_matches_from(iter), git_config, assets)
}