diff options
author | Pavel Roskin <1317472+proski@users.noreply.github.com> | 2023-06-17 12:51:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-17 19:51:06 +0000 |
commit | 474ee4bb75d06e9dfcf4a050fb738b45f8dd9135 (patch) | |
tree | a6f064eafd85f0541d625a3fdb459950b360db05 | |
parent | 727531406c8511c3b7685ea5bc6897604172e6aa (diff) | |
download | r-alacritty-474ee4bb75d06e9dfcf4a050fb738b45f8dd9135.tar.gz r-alacritty-474ee4bb75d06e9dfcf4a050fb738b45f8dd9135.tar.bz2 r-alacritty-474ee4bb75d06e9dfcf4a050fb738b45f8dd9135.zip |
Fix parsing of integer font sizes
Config file conversion broke parsing of the font size value if it's
written as an integer, since TOML integers are always signed.
-rw-r--r-- | alacritty/src/config/font.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alacritty/src/config/font.rs b/alacritty/src/config/font.rs index 9c431b15..d554278c 100644 --- a/alacritty/src/config/font.rs +++ b/alacritty/src/config/font.rs @@ -148,14 +148,14 @@ impl<'de> Deserialize<'de> for Size { type Value = Size; fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str("f64 or u64") + f.write_str("f64 or i64") } fn visit_f64<E: de::Error>(self, value: f64) -> Result<Self::Value, E> { Ok(Size(FontSize::new(value as f32))) } - fn visit_u64<E: de::Error>(self, value: u64) -> Result<Self::Value, E> { + fn visit_i64<E: de::Error>(self, value: i64) -> Result<Self::Value, E> { Ok(Size(FontSize::new(value as f32))) } } |