Further simplify module structure

This commit is contained in:
sharkdp 2020-03-21 21:15:12 +01:00 committed by David Peter
parent bb0a3d586e
commit 2c2861db6a
6 changed files with 13 additions and 10 deletions

View File

@ -1,7 +1,6 @@
use bat::{
assets::HighlightingAssets,
config::{Config, InputFile, StyleComponent, StyleComponents},
controller::Controller,
Controller, HighlightingAssets,
};
use console::Term;
use std::process;

View File

@ -17,12 +17,12 @@ use console::Term;
use ansi_term;
use bat::{
assets::HighlightingAssets,
config::{
Config, HighlightedLineRanges, InputFile, LineRange, LineRanges, OutputWrap, PagingMode,
StyleComponent, StyleComponents, SyntaxMapping,
},
errors::*,
HighlightingAssets,
};
fn is_truecolor_terminal() -> bool {

View File

@ -4,7 +4,7 @@ use std::path::PathBuf;
use crate::directories::PROJECT_DIRS;
use bat::assets::HighlightingAssets;
use bat::HighlightingAssets;
fn theme_set_path() -> PathBuf {
PROJECT_DIRS.cache_dir().join("themes.bin")

View File

@ -24,13 +24,13 @@ use ansi_term::Style;
use crate::{app::App, config::config_file};
use assets::{assets_from_cache_or_binary, cache_dir, clear_assets, config_dir};
use bat::controller::Controller;
use bat::Controller;
use directories::PROJECT_DIRS;
use bat::{
assets::HighlightingAssets,
config::{Config, InputFile, StyleComponent, StyleComponents},
errors::*,
HighlightingAssets,
};
fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {

View File

@ -12,9 +12,9 @@ extern crate shell_words;
extern crate syntect;
extern crate wild;
pub mod assets;
pub(crate) mod assets;
pub mod config;
pub mod controller;
pub(crate) mod controller;
mod decorations;
mod diff;
pub mod errors;
@ -23,8 +23,12 @@ mod less;
pub(crate) mod line_range;
mod output;
mod preprocessor;
mod printer;
pub(crate) mod printer;
pub(crate) mod style;
pub(crate) mod syntax_mapping;
mod terminal;
pub(crate) mod wrap;
pub use assets::HighlightingAssets;
pub use controller::Controller;
pub use printer::{InteractivePrinter, Printer, SimplePrinter};

View File

@ -1,6 +1,6 @@
use std::collections::HashSet;
use bat::assets::HighlightingAssets;
use bat::HighlightingAssets;
#[test]
fn no_duplicate_extensions() {