From 3ebd48039ed810899322f54ff1d95051b1481681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 29 May 2017 21:31:04 +0200 Subject: [PATCH] style: Allow StyleSource to be compared. --- components/style/rule_tree/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index 22a862cac5f..2557b4c77e5 100644 --- a/components/style/rule_tree/mod.rs +++ b/components/style/rule_tree/mod.rs @@ -61,6 +61,12 @@ pub enum StyleSource { Declarations(Arc>), } +impl PartialEq for StyleSource { + fn eq(&self, other: &Self) -> bool { + self.ptr_equals(other) + } +} + impl StyleSource { #[inline] fn ptr_equals(&self, other: &Self) -> bool {