@@ -8,7 +8,7 @@ use std::collections::VecDeque;
8
8
9
9
/// A `Color` can be one of the pre-defined ANSI colors (`Red`, `Green`, ..),
10
10
/// 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 ) ]
12
12
pub enum Color {
13
13
Black ,
14
14
Red ,
@@ -149,7 +149,7 @@ impl Color {
149
149
}
150
150
151
151
/// Font-style attributes.
152
- #[ derive( Debug , Clone , PartialEq , Default ) ]
152
+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash , Default ) ]
153
153
pub struct FontStyle {
154
154
pub bold : bool ,
155
155
pub dimmed : bool , // a.k.a. faint
@@ -262,7 +262,7 @@ impl FontStyle {
262
262
}
263
263
264
264
/// A foreground color, background color and font-style.
265
- #[ derive( Debug , Clone , PartialEq , Default ) ]
265
+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash , Default ) ]
266
266
pub struct Style {
267
267
pub foreground : Option < Color > ,
268
268
pub background : Option < Color > ,
0 commit comments