Simplify public API module structure

This commit is contained in:
sharkdp 2020-03-21 21:03:57 +01:00 committed by David Peter
parent 90397a8aac
commit bb0a3d586e
5 changed files with 16 additions and 22 deletions

View File

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

View File

@ -18,13 +18,11 @@ use ansi_term;
use bat::{
assets::HighlightingAssets,
config::{Config, PagingMode},
config::{
Config, HighlightedLineRanges, InputFile, LineRange, LineRanges, OutputWrap, PagingMode,
StyleComponent, StyleComponents, SyntaxMapping,
},
errors::*,
inputfile::InputFile,
line_range::{HighlightedLineRanges, LineRange, LineRanges},
style::{StyleComponent, StyleComponents},
syntax_mapping::SyntaxMapping,
wrap::OutputWrap,
};
fn is_truecolor_terminal() -> bool {

View File

@ -29,10 +29,8 @@ use directories::PROJECT_DIRS;
use bat::{
assets::HighlightingAssets,
config::Config,
config::{Config, InputFile, StyleComponent, StyleComponents},
errors::*,
inputfile::InputFile,
style::{StyleComponent, StyleComponents},
};
fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {

View File

@ -1,8 +1,8 @@
use crate::inputfile::InputFile;
use crate::line_range::{HighlightedLineRanges, LineRanges};
use crate::style::StyleComponents;
use crate::syntax_mapping::SyntaxMapping;
use crate::wrap::OutputWrap;
pub use crate::inputfile::InputFile;
pub use crate::line_range::{HighlightedLineRanges, LineRange, LineRanges};
pub use crate::style::{StyleComponent, StyleComponents};
pub use crate::syntax_mapping::SyntaxMapping;
pub use crate::wrap::OutputWrap;
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum PagingMode {

View File

@ -18,13 +18,13 @@ pub mod controller;
mod decorations;
mod diff;
pub mod errors;
pub mod inputfile;
pub(crate) mod inputfile;
mod less;
pub mod line_range;
pub(crate) mod line_range;
mod output;
mod preprocessor;
mod printer;
pub mod style;
pub mod syntax_mapping;
pub(crate) mod style;
pub(crate) mod syntax_mapping;
mod terminal;
pub mod wrap;
pub(crate) mod wrap;