mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-20 20:08:58 +00:00
Further simplify module structure
This commit is contained in:
parent
bb0a3d586e
commit
2c2861db6a
@ -1,7 +1,6 @@
|
||||
use bat::{
|
||||
assets::HighlightingAssets,
|
||||
config::{Config, InputFile, StyleComponent, StyleComponents},
|
||||
controller::Controller,
|
||||
Controller, HighlightingAssets,
|
||||
};
|
||||
use console::Term;
|
||||
use std::process;
|
||||
|
@ -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 {
|
||||
|
@ -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")
|
||||
|
@ -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<()> {
|
||||
|
10
src/lib.rs
10
src/lib.rs
@ -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};
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use bat::assets::HighlightingAssets;
|
||||
use bat::HighlightingAssets;
|
||||
|
||||
#[test]
|
||||
fn no_duplicate_extensions() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user