diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-27 15:46:25 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-27 15:46:25 +0100 |
| commit | 8f246406c61f3710fa6659e85d7c715b001ea05d (patch) | |
| tree | 958c027849e90c2929bf21b8f699edd1e132de35 | |
| parent | aa8a5bf42fa5f6e70faf374696888c640fae9e4e (diff) | |
Fix `PartialEq` and `Hash` impls of `Font`
| -rw-r--r-- | src/font/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/font/mod.rs b/src/font/mod.rs index ab94e093..bedc107d 100644 --- a/src/font/mod.rs +++ b/src/font/mod.rs @@ -124,6 +124,7 @@ impl Font { impl Hash for Font { fn hash<H: Hasher>(&self, state: &mut H) { self.0.data.hash(state); + self.0.index.hash(state); } } @@ -137,7 +138,7 @@ impl Eq for Font {} impl PartialEq for Font { fn eq(&self, other: &Self) -> bool { - self.0.data.eq(&other.0.data) + self.0.data == other.0.data && self.0.index == other.0.index } } |
