Derive fmt::Debug whenever possible

This commit is contained in:
Fahmi Akbar Wildana 2019-10-15 08:25:53 +07:00 committed by David Peter
parent 7208a63a49
commit 2253d07341
7 changed files with 8 additions and 6 deletions

View File

@ -16,6 +16,7 @@ use crate::syntax_mapping::SyntaxMapping;
pub const BAT_THEME_DEFAULT: &str = "Monokai Extended";
#[derive(Debug)]
pub struct HighlightingAssets {
pub syntax_set: SyntaxSet,
pub theme_set: ThemeSet,

View File

@ -2,7 +2,7 @@ use crate::diff::LineChange;
use crate::printer::{Colors, InteractivePrinter};
use ansi_term::Style;
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct DecorationText {
pub width: usize,
pub text: String,

View File

@ -76,7 +76,7 @@ use line_range::LineRanges;
use style::{OutputComponents, OutputWrap};
use syntax_mapping::SyntaxMapping;
#[derive(Clone, Default)]
#[derive(Debug, Clone, Default)]
pub struct Config<'a> {
/// List of files to print
pub files: Vec<InputFile<'a>>,

View File

@ -1,6 +1,6 @@
use crate::errors::*;
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct LineRange {
pub lower: usize,
pub upper: usize,
@ -89,7 +89,7 @@ pub enum RangeCheckResult {
AfterLastRange,
}
#[derive(Clone, Default)]
#[derive(Debug, Clone, Default)]
pub struct LineRanges {
ranges: Vec<LineRange>,
largest_upper_bound: usize,

View File

@ -9,6 +9,7 @@ use shell_words;
use crate::errors::*;
use crate::PagingMode;
#[derive(Debug)]
pub enum OutputType {
Pager(Child),
Stdout(io::Stdout),

View File

@ -567,7 +567,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
const DEFAULT_GUTTER_COLOR: u8 = 238;
#[derive(Default)]
#[derive(Debug, Default)]
pub struct Colors {
pub grid: Style,
pub filename: Style,

View File

@ -72,7 +72,7 @@ impl FromStr for OutputComponent {
}
}
#[derive(Clone, Default)]
#[derive(Debug, Clone, Default)]
pub struct OutputComponents(pub HashSet<OutputComponent>);
impl OutputComponents {