Add get_ref() method to DOMString

This commit is contained in:
Ilyong Cho 2013-08-12 14:04:11 +09:00 committed by Jack Moffitt
parent 034536e531
commit eadda9411b

View file

@ -105,6 +105,13 @@ impl DOMString {
null_string => ~""
}
}
pub fn get_ref<'a>(&'a self) -> &'a str {
match *self {
str(ref s) => s.as_slice(),
null_string => &'a "",
}
}
}
pub struct rust_box<T> {