From c0ac06ff2ffefb01e6070104727a6fbf24857966 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 31 Mar 2019 04:09:17 -0700 Subject: expose platform op color --- src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 35944a6..86c8a2d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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(&self, t: T) -> Colored; fn comparison_op(&self, t: T) -> Colored; fn invalid_op(&self, t: T) -> Colored; + fn platform_op(&self, t: T) -> Colored; fn register(&self, t: T) -> Colored; fn number(&self, t: T) -> Colored; @@ -263,6 +264,9 @@ impl YaxColors for ColorSettings { fn invalid_op(&self, t: T) -> Colored { Colored::Color(t, self.invalid) } + fn platform_op(&self, t: T) -> Colored { + Colored::Color(t, self.platform) + } fn register(&self, t: T) -> Colored { Colored::Color(t, self.register) @@ -339,6 +343,12 @@ impl <'a> YaxColors for Option<&'a ColorSettings> { None => { Colored::Just(t) } } } + fn platform_op(&self, t: T) -> Colored { + match self { + Some(colors) => { colors.platform_op(t) } + None => { Colored::Just(t) } + } + } fn register(&self, t: T) -> Colored { match self { -- cgit v1.1