summaryrefslogtreecommitdiffstats
path: root/alacritty_terminal
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-10-07 17:40:50 +0300
committerGitHub <noreply@github.com>2020-10-07 17:40:50 +0300
commit67db9b228d3b6c63484ca4b8fcae577afc0ee22a (patch)
tree52e2640140a4786f42d6ac6cf6f081c6dd9b21a2 /alacritty_terminal
parent44a6dba0af03d3b9305ceea31c3289709cc750e3 (diff)
Bump glutin to 0.25.0
Fixes #4206. Fixes #4162. Fixes #4017. Fixes #3998. Fixes #3831. Fixes #3782. Fixes #3708. Fixes #2734. Fixes #2714. Fixes #1801.
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/Cargo.toml4
-rw-r--r--alacritty_terminal/src/term/color.rs14
2 files changed, 15 insertions, 3 deletions
diff --git a/alacritty_terminal/Cargo.toml b/alacritty_terminal/Cargo.toml
index 7dfa5b09..83c5b416 100644
--- a/alacritty_terminal/Cargo.toml
+++ b/alacritty_terminal/Cargo.toml
@@ -11,7 +11,7 @@ edition = "2018"
[dependencies]
libc = "0.2"
bitflags = "1"
-parking_lot = "0.10.2"
+parking_lot = "0.11.0"
serde = { version = "1", features = ["derive"] }
serde_yaml = "0.8"
vte = { git = "https://github.com/alacritty/vte", rev = "4f44023dab081f7da74fee14bc53b10ee8f96a1e", default-features = false }
@@ -24,7 +24,7 @@ terminfo = "0.7.1"
regex-automata = "0.1.9"
[target.'cfg(unix)'.dependencies]
-nix = "0.17.0"
+nix = "0.18.0"
signal-hook = { version = "0.1", features = ["mio-support"] }
[target.'cfg(windows)'.dependencies]
diff --git a/alacritty_terminal/src/term/color.rs b/alacritty_terminal/src/term/color.rs
index 104fcfe5..8626cda5 100644
--- a/alacritty_terminal/src/term/color.rs
+++ b/alacritty_terminal/src/term/color.rs
@@ -1,5 +1,5 @@
use std::fmt::{self, Display, Formatter};
-use std::ops::{Index, IndexMut, Mul};
+use std::ops::{Add, Index, IndexMut, Mul};
use std::str::FromStr;
use log::trace;
@@ -75,6 +75,18 @@ impl Mul<f32> for Rgb {
}
}
+impl Add<Rgb> for Rgb {
+ type Output = Rgb;
+
+ fn add(self, rhs: Rgb) -> Rgb {
+ Rgb {
+ r: self.r.saturating_add(rhs.r),
+ g: self.g.saturating_add(rhs.g),
+ b: self.b.saturating_add(rhs.b),
+ }
+ }
+}
+
/// Deserialize an Rgb from a hex string.
///
/// This is *not* the deserialize impl for Rgb since we want a symmetric