From ae9b1636b18ae4719dfd173eee3973116e668d41 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sun, 29 Mar 2015 17:54:01 -0400 Subject: [PATCH] Fix useless assert in script::dom::element We should ensure the parameter is lowercased. Right now, the assert will always return true. Discussed in #5445 Introduced in ee2ccc4f872ba33a86057d87a99d1015b3c41cf1 --- components/script/dom/element.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 5c878b09f89..f69392a4126 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -798,7 +798,7 @@ impl<'a> AttributeHandlers for JSRef<'a, Element> { } fn set_atomic_attribute(self, name: &Atom, value: DOMString) { - assert!(name.eq_ignore_ascii_case(name)); + assert!(name.as_slice() == name.to_ascii_lowercase()); let value = AttrValue::from_atomic(value); self.set_attribute(name, value); }