aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/html/cssparse.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-03-21 11:51:25 +0100
committerMs2ger <ms2ger@gmail.com>2014-04-04 20:10:32 +0200
commit31eee791dd343807b6057c549bc74f41c4bf10a2 (patch)
tree67384f40b45addbb6e96fc6df320555b47e9397c /src/components/script/html/cssparse.rs
parent7ece5f92dbd82bae1ef4862497c8f1bc810c6c55 (diff)
downloadservo-31eee791dd343807b6057c549bc74f41c4bf10a2.tar.gz
servo-31eee791dd343807b6057c549bc74f41c4bf10a2.zip
Upgrade rust.
Diffstat (limited to 'src/components/script/html/cssparse.rs')
-rw-r--r--src/components/script/html/cssparse.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/script/html/cssparse.rs b/src/components/script/html/cssparse.rs
index 846af813461..c5cad0849de 100644
--- a/src/components/script/html/cssparse.rs
+++ b/src/components/script/html/cssparse.rs
@@ -4,13 +4,13 @@
/// Some little helpers for hooking up the HTML parser with the CSS parser.
-use std::comm::Port;
+use std::comm::{channel, Receiver};
use encoding::EncodingRef;
use encoding::all::UTF_8;
use style::Stylesheet;
use servo_net::resource_task::{Load, LoadResponse, ProgressMsg, Payload, Done, ResourceTask};
use servo_util::task::spawn_named;
-use extra::url::Url;
+use url::Url;
/// Where a style sheet comes from.
pub enum StylesheetProvenance {
@@ -20,8 +20,8 @@ pub enum StylesheetProvenance {
pub fn spawn_css_parser(provenance: StylesheetProvenance,
resource_task: ResourceTask)
- -> Port<Stylesheet> {
- let (result_port, result_chan) = Chan::new();
+ -> Receiver<Stylesheet> {
+ let (result_chan, result_port) = channel();
// TODO: Get the actual value. http://dev.w3.org/csswg/css-syntax/#environment-encoding
let environment_encoding = UTF_8 as EncodingRef;
@@ -30,7 +30,7 @@ pub fn spawn_css_parser(provenance: StylesheetProvenance,
let sheet = match provenance {
UrlProvenance(url) => {
debug!("cssparse: loading style sheet at {:s}", url.to_str());
- let (input_port, input_chan) = Chan::new();
+ let (input_chan, input_port) = channel();
resource_task.send(Load(url, input_chan));
let LoadResponse { metadata: metadata, progress_port: progress_port }
= input_port.recv();
@@ -52,7 +52,7 @@ pub fn spawn_css_parser(provenance: StylesheetProvenance,
}
struct ProgressMsgPortIterator {
- progress_port: Port<ProgressMsg>
+ progress_port: Receiver<ProgressMsg>
}
impl Iterator<~[u8]> for ProgressMsgPortIterator {