Make CharacterData store a ~str rather than a DOMString, because its data can never be null.

This commit is contained in:
Ms2ger 2013-09-05 19:24:49 +02:00
parent 9073329737
commit efff6be86c
2 changed files with 16 additions and 15 deletions

View file

@ -111,6 +111,14 @@ impl DOMString {
null_string => &'a "",
}
}
// XXX This is temporary until issue #875 is fixed.
pub fn unwrap(&self) -> ~str {
match self {
&str(ref s) => s.clone(),
&null_string => fail!("Cannot unwrap a null string.")
}
}
}
pub struct rust_box<T> {