Skip to content

Commit 014aa76

Browse files
REALERvolker1sharkdp
authored andcommitted
Allow Style to be used in hashmaps
1 parent 9a1421d commit 014aa76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/style.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::collections::VecDeque;
88

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

151151
/// Font-style attributes.
152-
#[derive(Debug, Clone, PartialEq, Default)]
152+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
153153
pub struct FontStyle {
154154
pub bold: bool,
155155
pub dimmed: bool, // a.k.a. faint
@@ -262,7 +262,7 @@ impl FontStyle {
262262
}
263263

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

0 commit comments

Comments
 (0)