mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-22 21:48:56 +01:00
Derive fmt::Debug whenever possible
This commit is contained in:
parent
7208a63a49
commit
2253d07341
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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>>,
|
||||
|
@ -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,
|
||||
|
@ -9,6 +9,7 @@ use shell_words;
|
||||
use crate::errors::*;
|
||||
use crate::PagingMode;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum OutputType {
|
||||
Pager(Child),
|
||||
Stdout(io::Stdout),
|
||||
|
@ -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,
|
||||
|
@ -72,7 +72,7 @@ impl FromStr for OutputComponent {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct OutputComponents(pub HashSet<OutputComponent>);
|
||||
|
||||
impl OutputComponents {
|
||||
|
Loading…
Reference in New Issue
Block a user