aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 9c02a92d68f..9c2031c79cf 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -40,7 +40,7 @@ use style;
use servo_util::namespace;
use servo_util::str::{DOMString, LengthOrPercentageOrAuto};
-use std::ascii::StrAsciiExt;
+use std::ascii::AsciiExt;
use std::default::Default;
use std::mem;
use string_cache::{Atom, Namespace, QualName};
@@ -311,7 +311,7 @@ impl RawLayoutElementHelpers for Element {
match length_attribute {
WidthLengthAttribute => {
if !self.is_htmltablecellelement() {
- fail!("I'm not a table cell!")
+ panic!("I'm not a table cell!")
}
let this: &HTMLTableCellElement = mem::transmute(self);
this.get_width()
@@ -326,7 +326,7 @@ impl RawLayoutElementHelpers for Element {
match integer_attribute {
SizeIntegerAttribute => {
if !self.is_htmlinputelement() {
- fail!("I'm not a form input!")
+ panic!("I'm not a form input!")
}
let this: &HTMLInputElement = mem::transmute(self);
Some(this.get_size_for_layout() as i32)
@@ -624,7 +624,7 @@ impl<'a> AttributeHandlers for JSRef<'a, Element> {
Some(attribute) => {
match *attribute.value() {
UIntAttrValue(_, value) => value,
- _ => fail!("Expected a UIntAttrValue"),
+ _ => panic!("Expected a UIntAttrValue"),
}
}
None => 0,
@@ -1131,7 +1131,7 @@ impl<'a> style::TElement<'a> for JSRef<'a, Element> {
let attr = attr.root();
match *attr.value() {
AtomAttrValue(ref val) => val.clone(),
- _ => fail!("`id` attribute should be AtomAttrValue"),
+ _ => panic!("`id` attribute should be AtomAttrValue"),
}
})
}