From 5104d2947fafb59022044be8c520810c7f9659c3 Mon Sep 17 00:00:00 2001 From: CYBAI Date: Fri, 26 Jan 2018 02:23:49 +0800 Subject: [PATCH] Use specific negative assertion for DOM XMLHttpRequest --- components/script/dom/xmlhttprequest.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index b005f4344f1..4e56661f0c4 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -75,7 +75,7 @@ use time; use timers::{OneshotTimerCallback, OneshotTimerHandle}; use url::Position; -#[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)] +#[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf, PartialEq)] enum XMLHttpRequestState { Unsent = 0, Opened = 1, @@ -849,7 +849,7 @@ pub type TrustedXHRAddress = Trusted; impl XMLHttpRequest { fn change_ready_state(&self, rs: XMLHttpRequestState) { - assert!(self.ready_state.get() != rs); + assert_ne!(self.ready_state.get(), rs); self.ready_state.set(rs); let event = Event::new(&self.global(), atom!("readystatechange"),