1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-01-18 20:11:03 +00:00

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::{ use bat::{
assets::HighlightingAssets, assets::HighlightingAssets,
config::Config, config::{Config, InputFile, StyleComponent, StyleComponents},
controller::Controller, controller::Controller,
inputfile::InputFile,
style::{StyleComponent, StyleComponents},
}; };
use console::Term; use console::Term;
use std::process; use std::process;

View File

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

View File

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

View File

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

View File

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