aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/html/hubbub_html_parser.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-04-26 14:57:32 +0200
committerMs2ger <ms2ger@gmail.com>2014-04-28 23:06:26 +0200
commit55ed05f2c701f14ad11132c46f1fdb1a464fd1c5 (patch)
tree9abe72aa7fdea95d820555b63e99bf9972d30503 /src/components/script/html/hubbub_html_parser.rs
parent6e617d8eba14f0475300d2602ca98d25276f8083 (diff)
downloadservo-55ed05f2c701f14ad11132c46f1fdb1a464fd1c5.tar.gz
servo-55ed05f2c701f14ad11132c46f1fdb1a464fd1c5.zip
Use Vec for the remaining ~[T]s in script.
Diffstat (limited to 'src/components/script/html/hubbub_html_parser.rs')
-rw-r--r--src/components/script/html/hubbub_html_parser.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs
index e6347f459ae..13cececb86a 100644
--- a/src/components/script/html/hubbub_html_parser.rs
+++ b/src/components/script/html/hubbub_html_parser.rs
@@ -50,7 +50,7 @@ pub struct JSFile {
pub url: Url
}
-pub type JSResult = ~[JSFile];
+pub type JSResult = Vec<JSFile>;
enum CSSMessage {
CSSTaskNewFile(StylesheetProvenance),
@@ -105,7 +105,7 @@ spawned, collates them, and sends them to the given result channel.
*/
fn css_link_listener(to_parent: Sender<HtmlDiscoveryMessage>,
from_parent: Receiver<CSSMessage>) {
- let mut result_vec = ~[];
+ let mut result_vec = vec!();
loop {
match from_parent.recv_opt() {
@@ -128,7 +128,7 @@ fn css_link_listener(to_parent: Sender<HtmlDiscoveryMessage>,
fn js_script_listener(to_parent: Sender<HtmlDiscoveryMessage>,
from_parent: Receiver<JSMessage>,
resource_task: ResourceTask) {
- let mut result_vec = ~[];
+ let mut result_vec = vec!();
loop {
match from_parent.recv_opt() {
@@ -465,7 +465,7 @@ pub fn parse_html(page: &Page,
js_chan2.send(JSTaskNewFile(new_url));
}
None => {
- let mut data = ~[];
+ let mut data = vec!();
let scriptnode: JS<Node> = NodeCast::from(&script);
debug!("iterating over children {:?}", scriptnode.first_child());
for child in scriptnode.children() {