From 3efa8b94776ecd0058cc7a2d6348195be4d1c0b3 Mon Sep 17 00:00:00 2001 From: Nathan Wilson Date: Sat, 4 Apr 2020 03:21:18 -0400 Subject: [PATCH] Removed some unnecessary parentheses and braces. (#409) --- src/event.rs | 2 +- src/style/sys/windows.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/event.rs b/src/event.rs index 8df56d4..6554f37 100644 --- a/src/event.rs +++ b/src/event.rs @@ -97,7 +97,7 @@ mod timeout; lazy_static! { /// Static instance of `InternalEventReader`. /// This needs to be static because there can be one event reader. - static ref INTERNAL_EVENT_READER: RwLock = { RwLock::new(read::InternalEventReader::default()) }; + static ref INTERNAL_EVENT_READER: RwLock = RwLock::new(read::InternalEventReader::default()); } /// Checks if there is an [`Event`](enum.Event.html) available. diff --git a/src/style/sys/windows.rs b/src/style/sys/windows.rs index 2b330a3..990de71 100644 --- a/src/style/sys/windows.rs +++ b/src/style/sys/windows.rs @@ -133,6 +133,7 @@ impl From for u16 { const REMOVE_BG_MASK: u16 = BG_INTENSITY | BG_RED | BG_GREEN | BG_BLUE; // remove all background values from the original color, we don't want to reset those. + original_color & !REMOVE_BG_MASK } @@ -165,6 +166,7 @@ impl From for u16 { const REMOVE_FG_MASK: u16 = FG_INTENSITY | FG_RED | FG_GREEN | FG_BLUE; // remove all foreground values from the original color, we don't want to reset those. + original_color & !REMOVE_FG_MASK } /* WinApi will be used for systems that do not support ANSI, those are windows version less then 10. RGB and 255 (AnsiBValue) colors are not supported in that case.*/