Fix PartialEq and Hash impls of Font

This commit is contained in:
Laurenz 2023-02-27 15:46:25 +01:00
parent aa8a5bf42f
commit 8f246406c6

View File

@ -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
}
}