diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -201,7 +201,7 @@ impl Default for ColorSettings { data: color::Fg(&color::Yellow), comparison: color::Fg(&color::Yellow), invalid: color::Fg(&color::Red), - platform: color::Fg(&color::Cyan), + platform: color::Fg(&color::LightBlue), misc: color::Fg(&color::LightCyan), register: color::Fg(&color::Cyan), @@ -227,6 +227,7 @@ pub trait YaxColors { fn data_op<T: Display>(&self, t: T) -> Colored<T>; fn comparison_op<T: Display>(&self, t: T) -> Colored<T>; fn invalid_op<T: Display>(&self, t: T) -> Colored<T>; + fn platform_op<T: Display>(&self, t: T) -> Colored<T>; fn register<T: Display>(&self, t: T) -> Colored<T>; fn number<T: Display>(&self, t: T) -> Colored<T>; @@ -263,6 +264,9 @@ impl YaxColors for ColorSettings { fn invalid_op<T: Display>(&self, t: T) -> Colored<T> { Colored::Color(t, self.invalid) } + fn platform_op<T: Display>(&self, t: T) -> Colored<T> { + Colored::Color(t, self.platform) + } fn register<T: Display>(&self, t: T) -> Colored<T> { Colored::Color(t, self.register) @@ -339,6 +343,12 @@ impl <'a> YaxColors for Option<&'a ColorSettings> { None => { Colored::Just(t) } } } + fn platform_op<T: Display>(&self, t: T) -> Colored<T> { + match self { + Some(colors) => { colors.platform_op(t) } + None => { Colored::Just(t) } + } + } fn register<T: Display>(&self, t: T) -> Colored<T> { match self { |