diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-01-25 18:06:33 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-25 18:06:33 -0600 |
commit | c9ba16f9fbdf7f43cb19feedfaaa68c85bbcbe3b (patch) | |
tree | b6b5d9e1539d294fdbba5fec5a545d8aa6552443 /components/script/dom/attr.rs | |
parent | fc3b1789318afc8f10e160d40b592234fbdb5cf4 (diff) | |
parent | 31631cdc47618a1591b6520eab8c82b28ac13bee (diff) | |
download | servo-c9ba16f9fbdf7f43cb19feedfaaa68c85bbcbe3b.tar.gz servo-c9ba16f9fbdf7f43cb19feedfaaa68c85bbcbe3b.zip |
Auto merge of #19868 - CYBAI:specific-assertion, r=emilio
Use specific assertions
Similar to #19865
r? jdm
Note: Should I squash all the commits into one commit?
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it should not break anything
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19868)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/attr.rs')
-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); |