mirror of
https://github.com/sharkdp/bat.git
synced 2024-12-23 23:08:54 +01:00
Simplify public API module structure
This commit is contained in:
parent
90397a8aac
commit
bb0a3d586e
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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<()> {
|
||||
|
@ -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 {
|
||||
|
10
src/lib.rs
10
src/lib.rs
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user