summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term/mod.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-07-28 13:00:55 +0300
committerGitHub <noreply@github.com>2020-07-28 13:00:55 +0300
commit6c4e45f3a69c71958e65fae9a15f82d0c5a27742 (patch)
tree311a32b95b705e9cded8fa2c6f06b297586513fe /alacritty_terminal/src/term/mod.rs
parentb7faa9f4378cf922c44f53a8003731fb0de13670 (diff)
downloadalacritty-6c4e45f3a69c71958e65fae9a15f82d0c5a27742.tar.gz
alacritty-6c4e45f3a69c71958e65fae9a15f82d0c5a27742.zip
Bump minimum supported Rust version to 1.43.0
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r--alacritty_terminal/src/term/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index ef61ebdf..7a409e2e 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -425,9 +425,11 @@ impl<'a, C> Iterator for RenderableCellsIter<'a, C> {
// Apply cursor color, or invert the cursor if it has a fixed background close
// to the cell's background.
- match self.cursor.cursor_color {
- CellRgb::Rgb(color) if color.contrast(cell.bg) < MIN_CURSOR_CONTRAST => (),
- _ => cell.fg = self.cursor.cursor_color.color(cell.fg, cell.bg),
+ if !matches!(
+ self.cursor.cursor_color,
+ CellRgb::Rgb(color) if color.contrast(cell.bg) < MIN_CURSOR_CONTRAST
+ ) {
+ cell.fg = self.cursor.cursor_color.color(cell.fg, cell.bg);
}
return Some(cell);