diff --git a/Cargo.toml b/Cargo.toml index d0414e0..1b2e137 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "termion" -version = "1.1.3" +version = "1.1.4" authors = ["ticki ", "gycos "] description = "A bindless library for manipulating terminals." repository = "https://github.com/ticki/termion" diff --git a/src/color.rs b/src/color.rs index e154ae2..d6d8992 100644 --- a/src/color.rs +++ b/src/color.rs @@ -61,6 +61,18 @@ derive_color!("High-intensity light magenta.", LightMagenta, "13"); derive_color!("High-intensity light cyan.", LightCyan, "14"); derive_color!("High-intensity light white.", LightWhite, "15"); +impl<'a> Color for &'a Color { + #[inline] + fn write_fg(&self, f: &mut fmt::Formatter) -> fmt::Result { + (*self).write_fg(f) + } + + #[inline] + fn write_bg(&self, f: &mut fmt::Formatter) -> fmt::Result { + (*self).write_bg(f) + } +} + /// An arbitrary ANSI color value. #[derive(Clone, Copy, Debug)] pub struct AnsiValue(pub u8);