diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-02-17 07:30:50 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-02-17 07:30:50 -0700 |
commit | afb152a8569953f730df564be2745c5a6302bf6f (patch) | |
tree | 57aaaabd556be56332dc5b13237373a05e10ae27 | |
parent | 4ab928728e3d65ac4c6ca72cd6c8aa0c75fde33b (diff) | |
parent | aaed4a54c700b85666a6aef6aa23e5fd315dd0d7 (diff) | |
download | servo-afb152a8569953f730df564be2745c5a6302bf6f.tar.gz servo-afb152a8569953f730df564be2745c5a6302bf6f.zip |
auto merge of #4947 : Ms2ger/servo/serialize, r=jdm
30 files changed, 54 insertions, 33 deletions
diff --git a/components/devtools/Cargo.toml b/components/devtools/Cargo.toml index 23b7bf5fec8..a97c9f1c4a9 100644 --- a/components/devtools/Cargo.toml +++ b/components/devtools/Cargo.toml @@ -17,4 +17,5 @@ path = "../msg" path = "../util" [dependencies] -time = "*"
\ No newline at end of file +time = "*" +rustc-serialize = "0.2" diff --git a/components/devtools/actor.rs b/components/devtools/actor.rs index 162da38b755..37c0a9c0482 100644 --- a/components/devtools/actor.rs +++ b/components/devtools/actor.rs @@ -10,7 +10,7 @@ use std::cell::{Cell, RefCell}; use std::old_io::TcpStream; use std::mem::{replace, transmute}; use std::raw::TraitObject; -use serialize::json; +use rustc_serialize::json; /// A common trait for all devtools actors that encompasses an immutable name /// and the ability to process messages that are directed to particular actors. diff --git a/components/devtools/actors/console.rs b/components/devtools/actors/console.rs index 4816787e0e8..e7151b55068 100644 --- a/components/devtools/actors/console.rs +++ b/components/devtools/actors/console.rs @@ -16,7 +16,7 @@ use msg::constellation_msg::PipelineId; use collections::BTreeMap; use core::cell::RefCell; -use serialize::json::{self, Json, ToJson}; +use rustc_serialize::json::{self, Json, ToJson}; use std::old_io::TcpStream; use std::num::Float; use std::sync::mpsc::{channel, Sender}; diff --git a/components/devtools/actors/inspector.rs b/components/devtools/actors/inspector.rs index 43c8881a0f0..8b8bfb41f97 100644 --- a/components/devtools/actors/inspector.rs +++ b/components/devtools/actors/inspector.rs @@ -13,7 +13,7 @@ use protocol::JsonPacketStream; use collections::BTreeMap; use msg::constellation_msg::PipelineId; -use serialize::json::{self, Json, ToJson}; +use rustc_serialize::json::{self, Json, ToJson}; use std::cell::RefCell; use std::old_io::TcpStream; use std::sync::mpsc::{channel, Sender}; diff --git a/components/devtools/actors/root.rs b/components/devtools/actors/root.rs index 2085b9fe814..453b3dd8161 100644 --- a/components/devtools/actors/root.rs +++ b/components/devtools/actors/root.rs @@ -10,7 +10,7 @@ use actor::{Actor, ActorRegistry}; use actors::tab::{TabActor, TabActorMsg}; use protocol::JsonPacketStream; -use serialize::json; +use rustc_serialize::json; use std::old_io::TcpStream; #[derive(RustcEncodable)] diff --git a/components/devtools/actors/tab.rs b/components/devtools/actors/tab.rs index ffabf959661..cee5b122905 100644 --- a/components/devtools/actors/tab.rs +++ b/components/devtools/actors/tab.rs @@ -11,7 +11,7 @@ use actors::console::ConsoleActor; use devtools_traits::DevtoolScriptControlMsg::WantsLiveNotifications; use protocol::JsonPacketStream; -use serialize::json; +use rustc_serialize::json; use std::old_io::TcpStream; #[derive(RustcEncodable)] diff --git a/components/devtools/lib.rs b/components/devtools/lib.rs index 16d973e90b4..1b31e5e7166 100644 --- a/components/devtools/lib.rs +++ b/components/devtools/lib.rs @@ -22,8 +22,7 @@ extern crate log; extern crate collections; extern crate core; extern crate devtools_traits; -extern crate "serialize" as rustc_serialize; -extern crate serialize; +extern crate "rustc-serialize" as rustc_serialize; extern crate msg; extern crate time; extern crate util; diff --git a/components/devtools/protocol.rs b/components/devtools/protocol.rs index 5ce91fb729f..07534df139b 100644 --- a/components/devtools/protocol.rs +++ b/components/devtools/protocol.rs @@ -6,8 +6,8 @@ //! [JSON packets] //! (https://wiki.mozilla.org/Remote_Debugging_Protocol_Stream_Transport#JSON_Packets). -use serialize::{json, Encodable}; -use serialize::json::Json; +use rustc_serialize::{json, Encodable}; +use rustc_serialize::json::Json; use std::old_io::{IoError, OtherIoError, EndOfFile, TcpStream, IoResult}; use std::num; @@ -39,7 +39,7 @@ impl JsonPacketStream for TcpStream { let packet_buf = self.read_exact(packet_len).unwrap(); let packet = String::from_utf8(packet_buf).unwrap(); println!("{}", packet); - return Ok(json::from_str(packet.as_slice()).unwrap()) + return Ok(Json::from_str(packet.as_slice()).unwrap()) }, Err(ref e) if e.kind == EndOfFile => return Err(IoError { kind: EndOfFile, desc: "EOF", detail: None }), diff --git a/components/devtools_traits/Cargo.toml b/components/devtools_traits/Cargo.toml index d916017ca66..e263f2fa299 100644 --- a/components/devtools_traits/Cargo.toml +++ b/components/devtools_traits/Cargo.toml @@ -15,3 +15,4 @@ path = "../util" [dependencies] url = "0.2.16" +rustc-serialize = "0.2" diff --git a/components/devtools_traits/lib.rs b/components/devtools_traits/lib.rs index 13815e8cf9e..bb83117740e 100644 --- a/components/devtools_traits/lib.rs +++ b/components/devtools_traits/lib.rs @@ -10,13 +10,12 @@ #![crate_type = "rlib"] #![feature(int_uint)] -#![feature(rustc_private)] #![allow(non_snake_case)] #![allow(missing_copy_implementations)] extern crate msg; -extern crate "serialize" as rustc_serialize; +extern crate "rustc-serialize" as rustc_serialize; extern crate url; extern crate util; diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 924e9dda340..0ae81eafeee 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -67,3 +67,4 @@ path = "../script_traits" url = "0.2.16" time = "0.1.12" bitflags = "*" +rustc-serialize = "0.2" diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index 98b35d01731..fcb57c2f807 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -31,7 +31,7 @@ extern crate libc; extern crate stb_image; extern crate png; extern crate script_traits; -extern crate "serialize" as rustc_serialize; +extern crate "rustc-serialize" as rustc_serialize; extern crate unicode; #[no_link] #[plugin] extern crate "plugins" as servo_plugins; diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 3445e214a21..eb39cdf3123 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -59,3 +59,4 @@ git = "https://github.com/servo/rust-png" encoding = "0.2" url = "0.2.16" bitflags = "*" +rustc-serialize = "0.2" diff --git a/components/layout/block.rs b/components/layout/block.rs index bac78f9021b..64e1372de2e 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -50,7 +50,7 @@ use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect, Size2D}; use gfx::display_list::{ClippingRegion, DisplayList}; -use serialize::{Encoder, Encodable}; +use rustc_serialize::{Encoder, Encodable}; use msg::compositor_msg::LayerId; use servo_util::geometry::{Au, MAX_AU}; use servo_util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize}; diff --git a/components/layout/flow.rs b/components/layout/flow.rs index 7b82f1d3fd9..a4f66437626 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -48,7 +48,7 @@ use wrapper::ThreadSafeLayoutNode; use geom::{Point2D, Rect, Size2D}; use gfx::display_list::ClippingRegion; -use serialize::{Encoder, Encodable}; +use rustc_serialize::{Encoder, Encodable}; use msg::compositor_msg::LayerId; use servo_util::geometry::{Au, ZERO_RECT}; use servo_util::logical_geometry::{LogicalRect, LogicalSize, WritingMode}; diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index e50342d2e69..46002c946ff 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -28,7 +28,7 @@ use gfx::display_list::{BOX_SHADOW_INFLATION_FACTOR, OpaqueNode}; use gfx::text::glyph::CharIndex; use gfx::text::text_run::{TextRun, TextRunSlice}; use script_traits::UntrustedNodeAddress; -use serialize::{Encodable, Encoder}; +use rustc_serialize::{Encodable, Encoder}; use msg::constellation_msg::{PipelineId, SubpageId}; use net::image::holder::ImageHolder; use net::local_image_cache::LocalImageCache; diff --git a/components/layout/layout_debug.rs b/components/layout/layout_debug.rs index 9ecb6a00ea2..ed73a1c693e 100644 --- a/components/layout/layout_debug.rs +++ b/components/layout/layout_debug.rs @@ -9,7 +9,7 @@ use flow_ref::FlowRef; use flow; -use serialize::json; +use rustc_serialize::json; use std::borrow::ToOwned; use std::cell::RefCell; diff --git a/components/layout/lib.rs b/components/layout/lib.rs index 30057310032..5644f55b7c2 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -34,8 +34,7 @@ extern crate gfx; extern crate layout_traits; extern crate script; extern crate script_traits; -extern crate "serialize" as rustc_serialize; -extern crate serialize; +extern crate "rustc-serialize" as rustc_serialize; extern crate png; extern crate style; #[macro_use] diff --git a/components/msg/lib.rs b/components/msg/lib.rs index 3fed347b085..8741de21f75 100644 --- a/components/msg/lib.rs +++ b/components/msg/lib.rs @@ -4,7 +4,6 @@ #![feature(hash)] #![feature(int_uint)] -#![feature(rustc_private)] #![allow(missing_copy_implementations)] @@ -13,7 +12,6 @@ extern crate azure; extern crate geom; extern crate hyper; extern crate layers; -extern crate serialize; extern crate util; extern crate url; diff --git a/components/net/data_loader.rs b/components/net/data_loader.rs index bdaca050477..d430e3e4eb4 100644 --- a/components/net/data_loader.rs +++ b/components/net/data_loader.rs @@ -5,7 +5,7 @@ use resource_task::{Metadata, LoadData, TargetedLoadResponse, start_sending, ResponseSenders}; use resource_task::ProgressMsg::{Payload, Done}; -use serialize::base64::FromBase64; +use rustc_serialize::base64::FromBase64; use hyper::mime::Mime; use url::{percent_decode, SchemeData}; diff --git a/components/net/lib.rs b/components/net/lib.rs index 45a6c4c114e..706af1a5347 100644 --- a/components/net/lib.rs +++ b/components/net/lib.rs @@ -23,7 +23,7 @@ extern crate png; #[macro_use] extern crate log; extern crate openssl; -extern crate "rustc-serialize" as serialize; +extern crate "rustc-serialize" as rustc_serialize; extern crate util; extern crate stb_image; extern crate time; diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 5fc5e5fcf17..fcc56776c8d 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -47,7 +47,7 @@ use js::rust::with_compartment; use url::{Url, UrlParser}; use libc; -use serialize::base64::{FromBase64, ToBase64, STANDARD}; +use rustc_serialize::base64::{FromBase64, ToBase64, STANDARD}; use std::cell::{Ref, RefMut}; use std::default::Default; use std::ffi::CString; diff --git a/components/script/lib.rs b/components/script/lib.rs index cedb7d361d5..d0419505e9a 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -38,7 +38,7 @@ extern crate js; extern crate libc; extern crate msg; extern crate net; -extern crate "rustc-serialize" as serialize; +extern crate "rustc-serialize" as rustc_serialize; extern crate time; extern crate canvas; extern crate script_traits; diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index 8b5f509544c..6bee3c388d1 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -5,7 +5,6 @@ #![feature(core)] #![feature(int_uint)] #![feature(libc)] -#![feature(rustc_private)] #![allow(missing_copy_implementations)] @@ -16,7 +15,6 @@ extern crate msg; extern crate net; extern crate util; extern crate url; -extern crate serialize; // This module contains traits in script used generically // in the rest of Servo. diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 0ca03e61ea0..37ac5a24115 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -157,6 +157,7 @@ version = "0.0.1" dependencies = [ "devtools_traits 0.0.1", "msg 0.0.1", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -166,6 +167,7 @@ name = "devtools_traits" version = "0.0.1" dependencies = [ "msg 0.0.1", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -285,7 +287,10 @@ dependencies = [ [[package]] name = "geom" version = "0.1.0" -source = "git+https://github.com/servo/rust-geom#e9d7ad3ce613dc152ec06a0cecaee6b628f903a1" +source = "git+https://github.com/servo/rust-geom#6b079ba2738ed15bac2b6ec66850494afb9f2b4c" +dependencies = [ + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "gfx" @@ -305,6 +310,7 @@ dependencies = [ "net 0.0.1", "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)", @@ -497,6 +503,7 @@ dependencies = [ "net 0.0.1", "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "script 0.0.1", "script_traits 0.0.1", "string_cache 0.0.0 (git+https://github.com/servo/string-cache)", @@ -831,6 +838,7 @@ dependencies = [ "lazy_static 0.1.7 (git+https://github.com/Kimundi/lazy-static.rs)", "plugins 0.0.1", "rand 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.0.0 (git+https://github.com/servo/string-cache)", "string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)", "task_info 0.0.1", diff --git a/components/style/lib.rs b/components/style/lib.rs index eb83aff1bec..9912133f44c 100644 --- a/components/style/lib.rs +++ b/components/style/lib.rs @@ -19,7 +19,6 @@ extern crate collections; extern crate geom; -extern crate serialize; extern crate text_writer; extern crate url; diff --git a/components/util/Cargo.toml b/components/util/Cargo.toml index 2f4cf2c568b..dceb222f457 100644 --- a/components/util/Cargo.toml +++ b/components/util/Cargo.toml @@ -45,3 +45,4 @@ url = "0.2.16" time = "0.1.12" bitflags = "*" rand = "*" +rustc-serialize = "0.2" diff --git a/components/util/lib.rs b/components/util/lib.rs index 36b61f6ed6a..ab197869cf8 100644 --- a/components/util/lib.rs +++ b/components/util/lib.rs @@ -33,7 +33,7 @@ extern crate layers; extern crate libc; #[no_link] #[macro_use] extern crate cssparser; extern crate rand; -extern crate "serialize" as rustc_serialize; +extern crate "rustc-serialize" as rustc_serialize; #[cfg(target_os="macos")] extern crate task_info; extern crate "time" as std_time; diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index c6b9c00bb42..abd58afdc40 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -160,6 +160,7 @@ version = "0.0.1" dependencies = [ "devtools_traits 0.0.1", "msg 0.0.1", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -169,6 +170,7 @@ name = "devtools_traits" version = "0.0.1" dependencies = [ "msg 0.0.1", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -288,7 +290,10 @@ dependencies = [ [[package]] name = "geom" version = "0.1.0" -source = "git+https://github.com/servo/rust-geom#e9d7ad3ce613dc152ec06a0cecaee6b628f903a1" +source = "git+https://github.com/servo/rust-geom#6b079ba2738ed15bac2b6ec66850494afb9f2b4c" +dependencies = [ + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "gfx" @@ -308,6 +313,7 @@ dependencies = [ "net 0.0.1", "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)", @@ -505,6 +511,7 @@ dependencies = [ "net 0.0.1", "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "script 0.0.1", "script_traits 0.0.1", "string_cache 0.0.0 (git+https://github.com/servo/string-cache)", @@ -858,6 +865,7 @@ dependencies = [ "lazy_static 0.1.7 (git+https://github.com/Kimundi/lazy-static.rs)", "plugins 0.0.1", "rand 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.0.0 (git+https://github.com/servo/string-cache)", "string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)", "task_info 0.0.1", diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 9926452e4e0..8d0e7620986 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -125,6 +125,7 @@ version = "0.0.1" dependencies = [ "devtools_traits 0.0.1", "msg 0.0.1", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -134,6 +135,7 @@ name = "devtools_traits" version = "0.0.1" dependencies = [ "msg 0.0.1", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -245,7 +247,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "geom" version = "0.1.0" -source = "git+https://github.com/servo/rust-geom#e9d7ad3ce613dc152ec06a0cecaee6b628f903a1" +source = "git+https://github.com/servo/rust-geom#6b079ba2738ed15bac2b6ec66850494afb9f2b4c" +dependencies = [ + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "gfx" @@ -265,6 +270,7 @@ dependencies = [ "net 0.0.1", "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "script_traits 0.0.1", "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)", @@ -412,6 +418,7 @@ dependencies = [ "net 0.0.1", "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "script 0.0.1", "script_traits 0.0.1", "string_cache 0.0.0 (git+https://github.com/servo/string-cache)", @@ -756,6 +763,7 @@ dependencies = [ "lazy_static 0.1.7 (git+https://github.com/Kimundi/lazy-static.rs)", "plugins 0.0.1", "rand 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.0.0 (git+https://github.com/servo/string-cache)", "string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)", "task_info 0.0.1", |