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:
parent
90397a8aac
commit
bb0a3d586e
@ -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;
|
||||||
|
@ -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 {
|
||||||
|
@ -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<()> {
|
||||||
|
@ -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 {
|
||||||
|
10
src/lib.rs
10
src/lib.rs
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user