From 1403fe2b8ef26c84cd625bb6f550755f82f47576 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sun, 27 Feb 2022 12:08:23 -0500 Subject: 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 --- src/cli.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cli.rs') 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 + 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) } -- cgit v1.2.3