mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000)
This commit is contained in:
parent
8a7eefefd5
commit
a640a7c5c3
74 changed files with 459 additions and 449 deletions
|
@ -6,8 +6,9 @@ use resource_task::{LoadResponse, Metadata, Done, LoadData, start_sending};
|
|||
use file_loader;
|
||||
|
||||
use std::os;
|
||||
use std::io::fs::PathExtensions;
|
||||
use url::Url;
|
||||
use StatusOk = http::status::Ok;
|
||||
use http::status::Ok as StatusOk;
|
||||
|
||||
|
||||
pub fn factory(mut load_data: LoadData, start_chan: Sender<LoadResponse>) {
|
||||
|
|
|
@ -37,7 +37,7 @@ fn load(load_data: LoadData, start_chan: Sender<LoadResponse>) {
|
|||
},
|
||||
None => ()
|
||||
}
|
||||
let parts: Vec<&str> = scheme_data.as_slice().splitn(',', 1).collect();
|
||||
let parts: Vec<&str> = scheme_data.as_slice().splitn(1, ',').collect();
|
||||
if parts.len() != 2 {
|
||||
start_sending(start_chan, metadata).send(Done(Err("invalid data uri".to_string())));
|
||||
return;
|
||||
|
|
|
@ -79,7 +79,7 @@ pub struct Request {
|
|||
pub manual_redirect: bool,
|
||||
pub redirect_count: uint,
|
||||
pub response_tainting: ResponseTainting,
|
||||
pub cache: Option<Box<CORSCache>>
|
||||
pub cache: Option<Box<CORSCache+'static>>
|
||||
}
|
||||
|
||||
impl Request {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use url::Url;
|
||||
use http::status::{Status, UnregisteredStatus};
|
||||
use StatusOk = http::status::Ok;
|
||||
use http::status::Ok as StatusOk;
|
||||
use http::headers::HeaderEnum;
|
||||
use http::headers::response::HeaderCollection;
|
||||
use std::ascii::OwnedStrAsciiExt;
|
||||
|
|
|
@ -69,7 +69,7 @@ fn load(load_data: LoadData, start_chan: Sender<LoadResponse>) {
|
|||
|
||||
// Preserve the `host` header set automatically by RequestWriter.
|
||||
let host = writer.headers.host.clone();
|
||||
writer.headers = box load_data.headers.clone();
|
||||
writer.headers = load_data.headers.clone();
|
||||
writer.headers.host = host;
|
||||
if writer.headers.accept_encoding.is_none() {
|
||||
// We currently don't support HTTP Compression (FIXME #2587)
|
||||
|
@ -130,7 +130,7 @@ fn load(load_data: LoadData, start_chan: Sender<LoadResponse>) {
|
|||
|
||||
let mut metadata = Metadata::default(url);
|
||||
metadata.set_content_type(&response.headers.content_type);
|
||||
metadata.headers = Some(*response.headers.clone());
|
||||
metadata.headers = Some(response.headers.clone());
|
||||
metadata.status = response.status.clone();
|
||||
|
||||
let progress_chan = match start_sending_opt(start_chan, metadata) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::iter::range_step;
|
||||
use stb_image = stb_image::image;
|
||||
use stb_image::image as stb_image;
|
||||
use png;
|
||||
|
||||
// FIXME: Images must not be copied every frame. Instead we should atomically
|
||||
|
|
|
@ -76,7 +76,7 @@ impl<E, S: Encoder<E>> Encodable<S, E> for ImageCacheTask {
|
|||
}
|
||||
}
|
||||
|
||||
type DecoderFactory = fn() -> proc(&[u8]) -> Option<Image>;
|
||||
type DecoderFactory = fn() -> (proc(&[u8]) : 'static -> Option<Image>);
|
||||
|
||||
impl ImageCacheTask {
|
||||
pub fn new(resource_task: ResourceTask) -> ImageCacheTask {
|
||||
|
|
|
@ -14,7 +14,7 @@ extern crate png;
|
|||
#[phase(plugin, link)]
|
||||
extern crate log;
|
||||
extern crate serialize;
|
||||
extern crate servo_util = "util";
|
||||
extern crate "util" as servo_util;
|
||||
extern crate stb_image;
|
||||
extern crate sync;
|
||||
extern crate time;
|
||||
|
|
|
@ -12,12 +12,12 @@ use http_loader;
|
|||
use std::comm::{channel, Receiver, Sender};
|
||||
use std::task::TaskBuilder;
|
||||
use http::headers::content_type::MediaType;
|
||||
use ResponseHeaderCollection = http::headers::response::HeaderCollection;
|
||||
use RequestHeaderCollection = http::headers::request::HeaderCollection;
|
||||
use http::headers::response::HeaderCollection as ResponseHeaderCollection;
|
||||
use http::headers::request::HeaderCollection as RequestHeaderCollection;
|
||||
use http::method::{Method, Get};
|
||||
use url::Url;
|
||||
|
||||
use StatusOk = http::status::Ok;
|
||||
use http::status::Ok as StatusOk;
|
||||
use http::status::Status;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue