mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
Use Vec for the remaining ~[T]s in script.
This commit is contained in:
parent
6e617d8eba
commit
55ed05f2c7
5 changed files with 12 additions and 13 deletions
|
@ -386,10 +386,9 @@ impl Document {
|
|||
}
|
||||
});
|
||||
});
|
||||
let v: ~[&str] = title.words().collect();
|
||||
title = v.connect(" ");
|
||||
title = title.trim().to_owned();
|
||||
title
|
||||
let v: Vec<&str> = title.words().collect();
|
||||
let title = v.connect(" ");
|
||||
title.trim().to_owned()
|
||||
}
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#document.title
|
||||
|
|
|
@ -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)
|
||||
};
|
||||
|
|
|
@ -94,7 +94,7 @@ impl HTMLCollection {
|
|||
pub fn by_class_name(window: &JS<Window>, root: &JS<Node>, classes: DOMString)
|
||||
-> JS<HTMLCollection> {
|
||||
struct ClassNameFilter {
|
||||
classes: ~[DOMString]
|
||||
classes: Vec<DOMString>
|
||||
}
|
||||
impl CollectionFilter for ClassNameFilter {
|
||||
fn filter(&self, elem: &JS<Element>, _root: &JS<Node>) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue