on master help sign in
Derive fmt::Debug whenever possible
2253d07Fahmi Akbar Wildana
src/assets.rs+1
@@ -16,6 +16,7 @@ use crate::syntax_mapping::SyntaxMapping;
16
16
17pub const BAT_THEME_DEFAULT: &str = "Monokai Extended";
17pub const BAT_THEME_DEFAULT: &str = "Monokai Extended";
18
18
19+#[derive(Debug)]
19pub struct HighlightingAssets {
20pub struct HighlightingAssets {
20 pub syntax_set: SyntaxSet,
21 pub syntax_set: SyntaxSet,
21 pub theme_set: ThemeSet,
22 pub theme_set: ThemeSet,
src/decorations.rs+1−1
@@ -2,7 +2,7 @@ use crate::diff::LineChange;
2use crate::printer::{Colors, InteractivePrinter};
2use crate::printer::{Colors, InteractivePrinter};
3use ansi_term::Style;
3use ansi_term::Style;
4
4
5−#[derive(Clone)]
5+#[derive(Debug, Clone)]
6pub struct DecorationText {
6pub struct DecorationText {
7 pub width: usize,
7 pub width: usize,
8 pub text: String,
8 pub text: String,
src/lib.rs+1−1
@@ -76,7 +76,7 @@ use line_range::LineRanges;
76use style::{OutputComponents, OutputWrap};
76use style::{OutputComponents, OutputWrap};
77use syntax_mapping::SyntaxMapping;
77use syntax_mapping::SyntaxMapping;
78
78
79−#[derive(Clone, Default)]
79+#[derive(Debug, Clone, Default)]
80pub struct Config<'a> {
80pub struct Config<'a> {
81 /// List of files to print
81 /// List of files to print
82 pub files: Vec<InputFile<'a>>,
82 pub files: Vec<InputFile<'a>>,
src/line_range.rs+2−2
@@ -1,6 +1,6 @@
1use crate::errors::*;
1use crate::errors::*;
2
2
3−#[derive(Clone)]
3+#[derive(Debug, Clone)]
4pub struct LineRange {
4pub struct LineRange {
5 pub lower: usize,
5 pub lower: usize,
6 pub upper: usize,
6 pub upper: usize,
@@ -89,7 +89,7 @@ pub enum RangeCheckResult {
89 AfterLastRange,
89 AfterLastRange,
90}
90}
91
91
92−#[derive(Clone, Default)]
92+#[derive(Debug, Clone, Default)]
93pub struct LineRanges {
93pub struct LineRanges {
94 ranges: Vec<LineRange>,
94 ranges: Vec<LineRange>,
95 largest_upper_bound: usize,
95 largest_upper_bound: usize,
src/output.rs+1
@@ -9,6 +9,7 @@ use shell_words;
9use crate::errors::*;
9use crate::errors::*;
10use crate::PagingMode;
10use crate::PagingMode;
11
11
12+#[derive(Debug)]
12pub enum OutputType {
13pub enum OutputType {
13 Pager(Child),
14 Pager(Child),
14 Stdout(io::Stdout),
15 Stdout(io::Stdout),
src/printer.rs+1−1
@@ -567,7 +567,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
567
567
568const DEFAULT_GUTTER_COLOR: u8 = 238;
568const DEFAULT_GUTTER_COLOR: u8 = 238;
569
569
570−#[derive(Default)]
570+#[derive(Debug, Default)]
571pub struct Colors {
571pub struct Colors {
572 pub grid: Style,
572 pub grid: Style,
573 pub filename: Style,
573 pub filename: Style,
src/style.rs+1−1
@@ -72,7 +72,7 @@ impl FromStr for OutputComponent {
72 }
72 }
73}
73}
74
74
75−#[derive(Clone, Default)]
75+#[derive(Debug, Clone, Default)]
76pub struct OutputComponents(pub HashSet<OutputComponent>);
76pub struct OutputComponents(pub HashSet<OutputComponent>);
77
77
78impl OutputComponents {
78impl OutputComponents {