mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Make CharacterData store a ~str rather than a DOMString, because its data can never be null.
This commit is contained in:
parent
9073329737
commit
efff6be86c
2 changed files with 16 additions and 15 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue