mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Update serde to 0.8 (fixes #12659)
This commit is contained in:
parent
a22913569c
commit
7ad51dcd7a
70 changed files with 919 additions and 778 deletions
|
@ -11,5 +11,5 @@ doctest = false
|
|||
|
||||
[dependencies]
|
||||
gfx = {path = "../../../components/gfx"}
|
||||
ipc-channel = "0.4.0"
|
||||
ipc-channel = "0.5"
|
||||
style = {path = "../../../components/style"}
|
||||
|
|
|
@ -10,12 +10,13 @@ path = "lib.rs"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
content-blocker = "0.2"
|
||||
content-blocker = "0.2.1"
|
||||
cookie = "0.2"
|
||||
devtools_traits = {path = "../../../components/devtools_traits"}
|
||||
flate2 = "0.2.0"
|
||||
hyper = "0.9.9"
|
||||
ipc-channel = "0.4.0"
|
||||
hyper_serde = "0.1.4"
|
||||
ipc-channel = "0.5"
|
||||
msg = {path = "../../../components/msg"}
|
||||
net = {path = "../../../components/net"}
|
||||
net_traits = {path = "../../../components/net_traits"}
|
||||
|
@ -23,5 +24,5 @@ plugins = {path = "../../../components/plugins"}
|
|||
profile_traits = {path = "../../../components/profile_traits"}
|
||||
time = "0.1"
|
||||
unicase = "1.0"
|
||||
url = {version = "1.0.0", features = ["heap_size"]}
|
||||
url = {version = "1.2", features = ["heap_size"]}
|
||||
util = {path = "../../../components/util"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
extern crate hyper;
|
||||
extern crate hyper_serde;
|
||||
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::ipc;
|
||||
use msg::constellation_msg::{PipelineId, ReferrerPolicy};
|
||||
use net_traits::LoadConsumer::Channel;
|
||||
|
@ -44,7 +46,8 @@ fn assert_parse(url: &'static str,
|
|||
classifier, CancellationListener::new(None));
|
||||
|
||||
let response = start_port.recv().unwrap();
|
||||
assert_eq!(&response.metadata.content_type, &content_type);
|
||||
assert_eq!(&response.metadata.content_type.map(Serde::into_inner),
|
||||
&content_type);
|
||||
assert_eq!(&response.metadata.charset, &charset);
|
||||
|
||||
let progress = response.progress_port.recv().unwrap();
|
||||
|
|
|
@ -18,6 +18,7 @@ use hyper::http::RawStatus;
|
|||
use hyper::method::Method;
|
||||
use hyper::mime::{Mime, SubLevel, TopLevel};
|
||||
use hyper::status::StatusCode;
|
||||
use hyper_serde::Serde;
|
||||
use msg::constellation_msg::{PipelineId, ReferrerPolicy};
|
||||
use net::cookie::Cookie;
|
||||
use net::cookie_storage::CookieStorage;
|
||||
|
@ -1584,7 +1585,8 @@ fn test_auth_ui_sets_header_on_401() {
|
|||
}, DEFAULT_USER_AGENT.to_owned(), &CancellationListener::new(None), None) {
|
||||
Err(e) => panic!("response contained error {:?}", e),
|
||||
Ok(response) => {
|
||||
assert_eq!(response.metadata.status, Some(RawStatus(200, Cow::Borrowed("Ok"))));
|
||||
assert_eq!(response.metadata.status,
|
||||
Some(Serde(RawStatus(200, Cow::Borrowed("Ok")))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1618,7 +1620,8 @@ fn test_auth_ui_needs_www_auth() {
|
|||
match response {
|
||||
Err(e) => panic!("response contained error {:?}", e),
|
||||
Ok(response) => {
|
||||
assert_eq!(response.metadata.status, Some(RawStatus(401, Cow::Borrowed("Unauthorized"))));
|
||||
assert_eq!(response.metadata.status,
|
||||
Some(Serde(RawStatus(401, Cow::Borrowed("Unauthorized")))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1944,7 +1947,7 @@ fn load_request_for_custom_response(expected_body: Vec<u8>) -> (Metadata, String
|
|||
fn test_custom_response() {
|
||||
let expected_body = b"Yay!".to_vec();
|
||||
let (metadata, body) = load_request_for_custom_response(expected_body.clone());
|
||||
assert_eq!(metadata.status, Some(RawStatus(200, Cow::Borrowed("OK"))));
|
||||
assert_eq!(metadata.status, Some(Serde(RawStatus(200, Cow::Borrowed("OK")))));
|
||||
assert_eq!(body, String::from_utf8(expected_body).unwrap());
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ extern crate cookie as cookie_rs;
|
|||
extern crate devtools_traits;
|
||||
extern crate flate2;
|
||||
extern crate hyper;
|
||||
extern crate hyper_serde;
|
||||
extern crate ipc_channel;
|
||||
extern crate msg;
|
||||
extern crate net;
|
||||
|
|
|
@ -12,4 +12,4 @@ doctest = false
|
|||
[dependencies]
|
||||
profile = {path = "../../../components/profile"}
|
||||
profile_traits = {path = "../../../components/profile_traits"}
|
||||
ipc-channel = "0.4.0"
|
||||
ipc-channel = "0.5"
|
||||
|
|
|
@ -13,4 +13,4 @@ doctest = false
|
|||
msg = {path = "../../../components/msg"}
|
||||
plugins = {path = "../../../components/plugins"}
|
||||
script = {path = "../../../components/script"}
|
||||
url = {version = "1.0.0", features = ["heap_size"]}
|
||||
url = {version = "1.2", features = ["heap_size"]}
|
||||
|
|
|
@ -10,13 +10,13 @@ path = "lib.rs"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.2.5"
|
||||
cssparser = {version = "0.5.4", features = ["heap_size"]}
|
||||
euclid = "0.8.2"
|
||||
app_units = "0.3"
|
||||
cssparser = {version = "0.5.7", features = ["heap_size"]}
|
||||
euclid = "0.9"
|
||||
rustc-serialize = "0.3"
|
||||
selectors = {version = "0.8", features = ["heap_size"]}
|
||||
string_cache = {version = "0.2", features = ["heap_size"]}
|
||||
string_cache = {version = "0.2.23", features = ["heap_size"]}
|
||||
style = {path = "../../../components/style"}
|
||||
style_traits = {path = "../../../components/style_traits"}
|
||||
url = {version = "1.0.0", features = ["heap_size"]}
|
||||
url = {version = "1.2", features = ["heap_size"]}
|
||||
util = {path = "../../../components/util"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue