Refactor Error enum usage to consistently be qualified

This commit is contained in:
Anthony Urena 2015-10-06 05:43:52 -04:00
parent 94816bb3b4
commit ba86131cd5
19 changed files with 139 additions and 161 deletions

View file

@ -12,8 +12,7 @@ use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLFrameSetElementDerived};
use dom::bindings::codegen::InheritTypes::{EventTargetCast, HTMLInputElementCast, NodeCast};
use dom::bindings::codegen::InheritTypes::{HTMLBodyElementDerived, HTMLElementDerived, HTMLHtmlElementDerived};
use dom::bindings::error::Error::Syntax;
use dom::bindings::error::ErrorResult;
use dom::bindings::error::{Error, ErrorResult};
use dom::bindings::js::{JS, MutNullableHeap, Root};
use dom::bindings::utils::Reflectable;
use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration};
@ -289,7 +288,7 @@ impl HTMLElement {
if name.chars()
.skip_while(|&ch| ch != '\u{2d}')
.nth(1).map_or(false, |ch| ch >= 'a' && ch <= 'z') {
return Err(Syntax);
return Err(Error::Syntax);
}
let element = ElementCast::from_ref(self);
element.set_custom_attribute(to_snake_case(name), value)