Derive Copy for color::{Rgb, Fg, Bg, Reset} (#54)

This commit is contained in:
Alexandre Bury 2016-10-08 22:13:41 -07:00 committed by ticki
parent 0b24a3446d
commit 4358ed6c48
1 changed files with 4 additions and 4 deletions

View File

@ -100,7 +100,7 @@ impl Color for AnsiValue {
} }
/// A truecolor RGB. /// A truecolor RGB.
#[derive(Debug, Clone)] #[derive(Debug, Clone, Copy)]
pub struct Rgb(pub u8, pub u8, pub u8); pub struct Rgb(pub u8, pub u8, pub u8);
impl Color for Rgb { impl Color for Rgb {
@ -116,7 +116,7 @@ impl Color for Rgb {
} }
/// Reset colors to defaults. /// Reset colors to defaults.
#[derive(Debug)] #[derive(Debug, Clone, Copy)]
pub struct Reset; pub struct Reset;
impl Color for Reset { impl Color for Reset {
@ -132,7 +132,7 @@ impl Color for Reset {
} }
/// A foreground color. /// A foreground color.
#[derive(Debug, Clone)] #[derive(Debug, Clone, Copy)]
pub struct Fg<C: Color>(pub C); pub struct Fg<C: Color>(pub C);
impl<C: Color> fmt::Display for Fg<C> { impl<C: Color> fmt::Display for Fg<C> {
@ -142,7 +142,7 @@ impl<C: Color> fmt::Display for Fg<C> {
} }
/// A background color. /// A background color.
#[derive(Debug, Clone)] #[derive(Debug, Clone, Copy)]
pub struct Bg<C: Color>(pub C); pub struct Bg<C: Color>(pub C);
impl<C: Color> fmt::Display for Bg<C> { impl<C: Color> fmt::Display for Bg<C> {