Skip to content

Commit a130328

Browse files
authored
Add Debug derives everywhere (#86)
* style: derive "Debug" on all structs At least all i have seen that dont have it yet. * fix(printer::PrinterType): derive "Clone" & "Copy" * fix(config::Config): derive "Clone"
1 parent 0dd4691 commit a130328

File tree

7 files changed

+7
-0
lines changed

7 files changed

+7
-0
lines changed

src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::utils;
22

33
/// Configuration struct to customize printing behaviour.
4+
#[derive(Debug, Clone)]
45
pub struct Config {
56
/// Enable true transparency instead of checkerboard background.
67
/// Available only for the block printer. Defaults to false.

src/printer/block.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const LOWER_HALF_BLOCK: &str = "\u{2584}";
1616
const CHECKERBOARD_BACKGROUND_LIGHT: (u8, u8, u8) = (153, 153, 153);
1717
const CHECKERBOARD_BACKGROUND_DARK: (u8, u8, u8) = (102, 102, 102);
1818

19+
#[derive(Debug)]
1920
pub struct BlockPrinter;
2021

2122
impl Printer for BlockPrinter {

src/printer/icy_sixel.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use super::{adjust_offset, find_best_fit, Printer};
22
use icy_sixel::sixel_string;
33
use image::{imageops::FilterType, GenericImageView};
44

5+
#[derive(Debug)]
56
pub struct IcySixelPrinter;
67

78
impl Printer for IcySixelPrinter {

src/printer/iterm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use std::{
1313
};
1414

1515
#[allow(non_camel_case_types)]
16+
#[derive(Debug)]
1617
pub struct iTermPrinter;
1718

1819
static ITERM_SUPPORT: LazyLock<bool> = LazyLock::new(check_iterm_support);

src/printer/kitty.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::io::Write;
88
use std::sync::LazyLock;
99
use tempfile::NamedTempFile;
1010

11+
#[derive(Debug)]
1112
pub struct KittyPrinter;
1213

1314
const TEMP_FILE_PREFIX: &str = ".tty-graphics-protocol.viuer.";

src/printer/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ pub trait Printer {
5959
}
6060

6161
#[allow(non_camel_case_types)]
62+
#[derive(Debug, Clone, Copy)]
6263
pub enum PrinterType {
6364
Block,
6465
Kitty,

src/printer/sixel.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use sixel_rs::encoder::{Encoder, QuickFrameBuilder};
66
use sixel_rs::optflags::EncodePolicy;
77
use std::io::Write;
88

9+
#[derive(Debug)]
910
pub struct SixelPrinter;
1011

1112
impl Printer for SixelPrinter {

0 commit comments

Comments
 (0)