Use Vec for the remaining ~[T]s in script.

This commit is contained in:
Ms2ger 2014-04-26 14:57:32 +02:00
parent 6e617d8eba
commit 55ed05f2c7
5 changed files with 12 additions and 13 deletions

View file

@ -651,8 +651,8 @@ pub fn get_attribute_parts(name: DOMString) -> (Option<~str>, ~str) {
//FIXME: Throw for XML-invalid names
//FIXME: Throw for XMLNS-invalid names
let (prefix, local_name) = if name.contains(":") {
let parts: ~[&str] = name.splitn(':', 1).collect();
(Some(parts[0].to_owned()), parts[1].to_owned())
let mut parts = name.splitn(':', 1);
(Some(parts.next().unwrap().to_owned()), parts.next().unwrap().to_owned())
} else {
(None, name)
};