mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Refactor Error enum usage to consistently be qualified
This commit is contained in:
parent
94816bb3b4
commit
ba86131cd5
19 changed files with 139 additions and 161 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue