mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Derive PartialEq on the style Font structure
We check the hash first.
This commit is contained in:
parent
217c7da413
commit
6d6dbf0129
2 changed files with 17 additions and 6 deletions
|
@ -321,12 +321,7 @@ struct LayoutFontGroupCacheKey {
|
|||
|
||||
impl PartialEq for LayoutFontGroupCacheKey {
|
||||
fn eq(&self, other: &LayoutFontGroupCacheKey) -> bool {
|
||||
self.pointer.font_family == other.pointer.font_family &&
|
||||
self.pointer.font_stretch == other.pointer.font_stretch &&
|
||||
self.pointer.font_style == other.pointer.font_style &&
|
||||
self.pointer.font_weight as u16 == other.pointer.font_weight as u16 &&
|
||||
self.pointer.font_variant == other.pointer.font_variant &&
|
||||
self.size == other.size
|
||||
self.pointer == other.pointer && self.size == other.size
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue