on master help sign in
Further simplify module structure
commit2c2861db6abfdcccdb6ca144c35ad5012efb0b6c authorsharkdp <davidpeter@web.de> dateSat 21 Mar 2020, 21:15 (7 years ago) parentbb0a3d5
6 files changed+13−10
examples/simple.rs+1−2 src/bin/bat/app.rs+1−1 src/bin/bat/assets.rs+1−1 src/bin/bat/main.rs+2−2 src/lib.rs+7−3 tests/no_duplicate_extensions.rs+1−1
examples/simple.rs+1−2
@@ -1,7 +1,6 @@
11use bat::{
2− assets::HighlightingAssets,
32 config::{Config, InputFile, StyleComponent, StyleComponents},
4− controller::Controller,
3+ Controller, HighlightingAssets,
54};
65use console::Term;
76use std::process;
src/bin/bat/app.rs+1−1
@@ -17,12 +17,12 @@ use console::Term;
1717use ansi_term;
1818
1919use bat::{
20− assets::HighlightingAssets,
2120 config::{
2221 Config, HighlightedLineRanges, InputFile, LineRange, LineRanges, OutputWrap, PagingMode,
2322 StyleComponent, StyleComponents, SyntaxMapping,
2423 },
2524 errors::*,
25+ HighlightingAssets,
2626};
2727
2828fn is_truecolor_terminal() -> bool {
src/bin/bat/assets.rs+1−1
@@ -4,7 +4,7 @@ use std::path::PathBuf;
44
55use crate::directories::PROJECT_DIRS;
66
7−use bat::assets::HighlightingAssets;
7+use bat::HighlightingAssets;
88
99fn theme_set_path() -> PathBuf {
1010 PROJECT_DIRS.cache_dir().join("themes.bin")
src/bin/bat/main.rs+2−2
@@ -24,13 +24,13 @@ use ansi_term::Style;
2424
2525use crate::{app::App, config::config_file};
2626use assets::{assets_from_cache_or_binary, cache_dir, clear_assets, config_dir};
27−use bat::controller::Controller;
27+use bat::Controller;
2828use directories::PROJECT_DIRS;
2929
3030use bat::{
31− assets::HighlightingAssets,
3231 config::{Config, InputFile, StyleComponent, StyleComponents},
3332 errors::*,
33+ HighlightingAssets,
3434};
3535
3636fn run_cache_subcommand(matches: &clap::ArgMatches) -> Result<()> {
src/lib.rs+7−3
@@ -12,9 +12,9 @@ extern crate shell_words;
1212extern crate syntect;
1313extern crate wild;
1414
15−pub mod assets;
15+pub(crate) mod assets;
1616pub mod config;
17−pub mod controller;
17+pub(crate) mod controller;
1818mod decorations;
1919mod diff;
2020pub mod errors;
@@ -23,8 +23,12 @@ mod less;
2323pub(crate) mod line_range;
2424mod output;
2525mod preprocessor;
26−mod printer;
26+pub(crate) mod printer;
2727pub(crate) mod style;
2828pub(crate) mod syntax_mapping;
2929mod terminal;
3030pub(crate) mod wrap;
31+
32+pub use assets::HighlightingAssets;
33+pub use controller::Controller;
34+pub use printer::{InteractivePrinter, Printer, SimplePrinter};
tests/no_duplicate_extensions.rs+1−1
@@ -1,6 +1,6 @@
11use std::collections::HashSet;
22
3−use bat::assets::HighlightingAssets;
3+use bat::HighlightingAssets;
44
55#[test]
66fn no_duplicate_extensions() {