style: Allow StyleSource to be compared.

This commit is contained in:
Emilio Cobos Álvarez 2017-05-29 21:31:04 +02:00
parent 63533ce72a
commit 3ebd48039e
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -61,6 +61,12 @@ pub enum StyleSource {
Declarations(Arc<Locked<PropertyDeclarationBlock>>),
}
impl PartialEq for StyleSource {
fn eq(&self, other: &Self) -> bool {
self.ptr_equals(other)
}
}
impl StyleSource {
#[inline]
fn ptr_equals(&self, other: &Self) -> bool {