Skip to content

Commit

Permalink
Allow Style to be used in hashmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
REALERvolker1 authored and sharkdp committed May 5, 2024
1 parent 9a1421d commit 014aa76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::collections::VecDeque;

/// A `Color` can be one of the pre-defined ANSI colors (`Red`, `Green`, ..),
/// a 8-bit ANSI color (`Fixed(u8)`) or a 24-bit color (`RGB(u8, u8, u8)`).
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Color {
Black,
Red,
Expand Down Expand Up @@ -149,7 +149,7 @@ impl Color {
}

/// Font-style attributes.
#[derive(Debug, Clone, PartialEq, Default)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct FontStyle {
pub bold: bool,
pub dimmed: bool, // a.k.a. faint
Expand Down Expand Up @@ -262,7 +262,7 @@ impl FontStyle {
}

/// A foreground color, background color and font-style.
#[derive(Debug, Clone, PartialEq, Default)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct Style {
pub foreground: Option<Color>,
pub background: Option<Color>,
Expand Down

0 comments on commit 014aa76

Please sign in to comment.