mirror of
https://github.com/sharkdp/bat
synced 2024-11-15 00:12:57 +00: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";
|
pub const BAT_THEME_DEFAULT: &str = "Monokai Extended";
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct HighlightingAssets {
|
pub struct HighlightingAssets {
|
||||||
pub syntax_set: SyntaxSet,
|
pub syntax_set: SyntaxSet,
|
||||||
pub theme_set: ThemeSet,
|
pub theme_set: ThemeSet,
|
||||||
|
@ -2,7 +2,7 @@ use crate::diff::LineChange;
|
|||||||
use crate::printer::{Colors, InteractivePrinter};
|
use crate::printer::{Colors, InteractivePrinter};
|
||||||
use ansi_term::Style;
|
use ansi_term::Style;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct DecorationText {
|
pub struct DecorationText {
|
||||||
pub width: usize,
|
pub width: usize,
|
||||||
pub text: String,
|
pub text: String,
|
||||||
|
@ -76,7 +76,7 @@ use line_range::LineRanges;
|
|||||||
use style::{OutputComponents, OutputWrap};
|
use style::{OutputComponents, OutputWrap};
|
||||||
use syntax_mapping::SyntaxMapping;
|
use syntax_mapping::SyntaxMapping;
|
||||||
|
|
||||||
#[derive(Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct Config<'a> {
|
pub struct Config<'a> {
|
||||||
/// List of files to print
|
/// List of files to print
|
||||||
pub files: Vec<InputFile<'a>>,
|
pub files: Vec<InputFile<'a>>,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use crate::errors::*;
|
use crate::errors::*;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct LineRange {
|
pub struct LineRange {
|
||||||
pub lower: usize,
|
pub lower: usize,
|
||||||
pub upper: usize,
|
pub upper: usize,
|
||||||
@ -89,7 +89,7 @@ pub enum RangeCheckResult {
|
|||||||
AfterLastRange,
|
AfterLastRange,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct LineRanges {
|
pub struct LineRanges {
|
||||||
ranges: Vec<LineRange>,
|
ranges: Vec<LineRange>,
|
||||||
largest_upper_bound: usize,
|
largest_upper_bound: usize,
|
||||||
|
@ -9,6 +9,7 @@ use shell_words;
|
|||||||
use crate::errors::*;
|
use crate::errors::*;
|
||||||
use crate::PagingMode;
|
use crate::PagingMode;
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub enum OutputType {
|
pub enum OutputType {
|
||||||
Pager(Child),
|
Pager(Child),
|
||||||
Stdout(io::Stdout),
|
Stdout(io::Stdout),
|
||||||
|
@ -567,7 +567,7 @@ impl<'a> Printer for InteractivePrinter<'a> {
|
|||||||
|
|
||||||
const DEFAULT_GUTTER_COLOR: u8 = 238;
|
const DEFAULT_GUTTER_COLOR: u8 = 238;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct Colors {
|
pub struct Colors {
|
||||||
pub grid: Style,
|
pub grid: Style,
|
||||||
pub filename: 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>);
|
pub struct OutputComponents(pub HashSet<OutputComponent>);
|
||||||
|
|
||||||
impl OutputComponents {
|
impl OutputComponents {
|
||||||
|
Loading…
Reference in New Issue
Block a user