Removed some unnecessary parentheses and braces. (#409)

This commit is contained in:
Nathan Wilson 2020-04-04 03:21:18 -04:00 committed by GitHub
parent 428519994c
commit 3efa8b9477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -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<read::InternalEventReader> = { RwLock::new(read::InternalEventReader::default()) };
static ref INTERNAL_EVENT_READER: RwLock<read::InternalEventReader> = RwLock::new(read::InternalEventReader::default());
}
/// Checks if there is an [`Event`](enum.Event.html) available.

View File

@ -133,6 +133,7 @@ impl From<Colored> 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<Colored> 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.*/