diff options
author | CYBAI <cyb.ai.815@gmail.com> | 2018-01-25 23:48:40 +0800 |
---|---|---|
committer | CYBAI <cyb.ai.815@gmail.com> | 2018-01-26 01:18:54 +0800 |
commit | 34babb6dcf1ef9c3f9e12c96ca420a83c318daaf (patch) | |
tree | 14dba06ae5a8d10ad7de48f4f5f496c2589041a2 | |
parent | 968976aba7a0162c0769220fe5f0d58fb3699e49 (diff) | |
download | servo-34babb6dcf1ef9c3f9e12c96ca420a83c318daaf.tar.gz servo-34babb6dcf1ef9c3f9e12c96ca420a83c318daaf.zip |
Use specific assertion for DOM attr
-rw-r--r-- | components/script/dom/attr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index c50ccae3e8e..0f6a0b6c96a 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -195,7 +195,7 @@ impl Attr { ScriptThread::enqueue_callback_reaction(owner, reaction, None); } - assert!(Some(owner) == self.owner().r()); + assert_eq!(Some(owner), self.owner().r()); owner.will_mutate_attr(self); self.swap_value(&mut value); if self.identifier.namespace == ns!() { @@ -230,7 +230,7 @@ impl Attr { // Already gone from the list of attributes of old owner. assert!(old.get_attribute(&ns, &self.identifier.local_name).r() != Some(self)) } - (Some(old), Some(new)) => assert!(&*old == new), + (Some(old), Some(new)) => assert_eq!(&*old, new), _ => {}, } self.owner.set(owner); |