From 1f9ce9e5d7406a993feb4898a26957461c1794ac Mon Sep 17 00:00:00 2001 From: CYBAI Date: Fri, 26 Jan 2018 02:07:27 +0800 Subject: [PATCH] Use specific negative assertion for DOM bindings utils --- components/script/dom/bindings/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 4a6d19f972a..4052add0083 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -115,7 +115,7 @@ unsafe impl Sync for DOMJSClass {} /// Fails if `global` is not a DOM global object. pub fn get_proto_or_iface_array(global: *mut JSObject) -> *mut ProtoOrIfaceArray { unsafe { - assert!(((*get_object_class(global)).flags & JSCLASS_DOM_GLOBAL) != 0); + assert_ne!(((*get_object_class(global)).flags & JSCLASS_DOM_GLOBAL), 0); JS_GetReservedSlot(global, DOM_PROTOTYPE_SLOT).to_private() as *mut ProtoOrIfaceArray } }