mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +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,16 +11,16 @@ name = "gfx"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.2.5"
|
||||
app_units = "0.3"
|
||||
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
|
||||
bitflags = "0.7"
|
||||
euclid = "0.8.2"
|
||||
euclid = "0.9"
|
||||
fnv = "1.0"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
harfbuzz-sys = "0.1"
|
||||
heapsize = "0.3.0"
|
||||
heapsize_plugin = "0.1.2"
|
||||
ipc-channel = "0.4.0"
|
||||
ipc-channel = "0.5"
|
||||
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
|
||||
lazy_static = "0.2"
|
||||
libc = "0.2"
|
||||
|
@ -34,15 +34,15 @@ profile_traits = {path = "../profile_traits"}
|
|||
rand = "0.3"
|
||||
range = {path = "../range"}
|
||||
rustc-serialize = "0.3"
|
||||
serde = "0.7.15"
|
||||
serde_macros = "0.7.15"
|
||||
serde = "0.8"
|
||||
serde_macros = "0.8"
|
||||
smallvec = "0.1"
|
||||
string_cache = {version = "0.2.20", features = ["heap_size"]}
|
||||
string_cache = {version = "0.2.23", features = ["heap_size"]}
|
||||
style = {path = "../style"}
|
||||
style_traits = {path = "../style_traits"}
|
||||
time = "0.1.12"
|
||||
unicode-script = {version = "0.1", features = ["harfbuzz"]}
|
||||
url = {version = "1.0.0", features = ["heap_size"]}
|
||||
url = {version = "1.2", features = ["heap_size"]}
|
||||
util = {path = "../util"}
|
||||
xi-unicode = "0.0.1"
|
||||
|
||||
|
@ -54,8 +54,8 @@ features = ["serde_macros"]
|
|||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
byteorder = "0.5"
|
||||
core-foundation = "0.2"
|
||||
core-graphics = "0.3"
|
||||
core-text = "1.1"
|
||||
core-graphics = "0.4"
|
||||
core-text = "2.0"
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))'.dependencies]
|
||||
freetype = {git = "https://github.com/servo/rust-freetype"}
|
||||
|
|
|
@ -31,7 +31,6 @@ use net_traits::image::base::{Image, PixelFormat};
|
|||
use paint_context::PaintContext;
|
||||
use range::Range;
|
||||
use serde::de::{self, Deserialize, Deserializer, MapVisitor, Visitor};
|
||||
use serde::ser::impls::MapIteratorVisitor;
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use std::cmp::{self, Ordering};
|
||||
use std::collections::HashMap;
|
||||
|
@ -161,7 +160,12 @@ impl<K, V> DerefMut for FnvHashMap<K, V> {
|
|||
impl<K, V> Serialize for FnvHashMap<K, V> where K: Eq + Hash + Serialize, V: Serialize {
|
||||
#[inline]
|
||||
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer {
|
||||
serializer.serialize_map(MapIteratorVisitor::new(self.iter(), Some(self.len())))
|
||||
let mut state = try!(serializer.serialize_map(Some(self.len())));
|
||||
for (key, value) in self.iter() {
|
||||
try!(serializer.serialize_map_key(&mut state, key));
|
||||
try!(serializer.serialize_map_value(&mut state, value));
|
||||
}
|
||||
serializer.serialize_map_end(state)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ impl FontCache {
|
|||
Ok(ref metadata) => {
|
||||
metadata.content_type.as_ref().map_or(false, |content_type| {
|
||||
let mime = &content_type.0;
|
||||
is_supported_font_type(&mime.0, &mime.1)
|
||||
is_supported_font_type(&(mime.0).0, &mime.1)
|
||||
})
|
||||
}
|
||||
Err(_) => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue