mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-17 02:11:02 +00:00
Follow rust std: fmt::Show was renamed to fmt::Debug
This commit is contained in:
@@ -17,7 +17,7 @@ use Animal::{Dog, Frog};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(Clone, PartialEq, Show, RustcDecodable)]
|
||||
#[derive(Clone, PartialEq, Debug, RustcDecodable)]
|
||||
#[derive_deserialize]
|
||||
enum Animal {
|
||||
Dog,
|
||||
@@ -26,7 +26,7 @@ enum Animal {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(Show)]
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
EndOfStream,
|
||||
SyntaxError,
|
||||
|
||||
@@ -22,7 +22,7 @@ use serde::ser;
|
||||
|
||||
use rustc_serialize::Encodable;
|
||||
|
||||
#[derive(Show, PartialEq, RustcEncodable, RustcDecodable)]
|
||||
#[derive(Debug, PartialEq, RustcEncodable, RustcDecodable)]
|
||||
#[derive_serialize]
|
||||
#[derive_deserialize]
|
||||
struct Http {
|
||||
@@ -37,7 +37,7 @@ struct Http {
|
||||
request_uri: String,
|
||||
}
|
||||
|
||||
#[derive(Copy, Show, PartialEq, FromPrimitive)]
|
||||
#[derive(Copy, Debug, PartialEq, FromPrimitive)]
|
||||
enum HttpProtocol {
|
||||
HTTP_PROTOCOL_UNKNOWN,
|
||||
HTTP10,
|
||||
@@ -73,7 +73,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for HttpProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Show, PartialEq, FromPrimitive)]
|
||||
#[derive(Copy, Debug, PartialEq, FromPrimitive)]
|
||||
enum HttpMethod {
|
||||
METHOD_UNKNOWN,
|
||||
GET,
|
||||
@@ -117,7 +117,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for HttpMethod {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Show, PartialEq, FromPrimitive)]
|
||||
#[derive(Copy, Debug, PartialEq, FromPrimitive)]
|
||||
enum CacheStatus {
|
||||
CACHESTATUS_UNKNOWN,
|
||||
Miss,
|
||||
@@ -154,7 +154,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for CacheStatus {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Show, PartialEq, RustcEncodable, RustcDecodable)]
|
||||
#[derive(Debug, PartialEq, RustcEncodable, RustcDecodable)]
|
||||
#[derive_serialize]
|
||||
#[derive_deserialize]
|
||||
struct Origin {
|
||||
@@ -164,7 +164,7 @@ struct Origin {
|
||||
protocol: OriginProtocol,
|
||||
}
|
||||
|
||||
#[derive(Copy, Show, PartialEq, FromPrimitive)]
|
||||
#[derive(Copy, Debug, PartialEq, FromPrimitive)]
|
||||
enum OriginProtocol {
|
||||
ORIGIN_PROTOCOL_UNKNOWN,
|
||||
HTTP,
|
||||
@@ -200,7 +200,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for OriginProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Show, PartialEq, FromPrimitive)]
|
||||
#[derive(Copy, Debug, PartialEq, FromPrimitive)]
|
||||
enum ZonePlan {
|
||||
ZONEPLAN_UNKNOWN,
|
||||
FREE,
|
||||
@@ -238,7 +238,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for ZonePlan {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Show, PartialEq, FromPrimitive)]
|
||||
#[derive(Copy, Debug, PartialEq, FromPrimitive)]
|
||||
enum Country {
|
||||
UNKNOWN,
|
||||
A1,
|
||||
@@ -527,7 +527,7 @@ impl<D: de::Deserializer<E>, E> de::Deserialize<D, E> for Country {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Show, PartialEq, RustcEncodable, RustcDecodable)]
|
||||
#[derive(Debug, PartialEq, RustcEncodable, RustcDecodable)]
|
||||
#[derive_serialize]
|
||||
#[derive_deserialize]
|
||||
struct Log {
|
||||
|
||||
@@ -7,7 +7,7 @@ extern crate serde;
|
||||
extern crate "rustc-serialize" as rustc_serialize;
|
||||
extern crate test;
|
||||
|
||||
use std::fmt::Show;
|
||||
use std::fmt::Debug;
|
||||
use std::collections::HashMap;
|
||||
use test::Bencher;
|
||||
|
||||
@@ -17,7 +17,7 @@ use serde::de::{Deserializer, Deserialize};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(PartialEq, Show)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub enum Error {
|
||||
EndOfStream,
|
||||
SyntaxError,
|
||||
@@ -226,7 +226,7 @@ mod deserializer {
|
||||
|
||||
use serde::de;
|
||||
|
||||
#[derive(PartialEq, Show)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
enum State {
|
||||
StartState,
|
||||
KeyOrEndState,
|
||||
@@ -321,7 +321,7 @@ mod deserializer {
|
||||
|
||||
fn run_decoder<
|
||||
D: Decoder<Error=Error>,
|
||||
T: Clone + PartialEq + Show + Decodable
|
||||
T: Clone + PartialEq + Debug + Decodable
|
||||
>(mut d: D, value: T) {
|
||||
let v = Decodable::decode(&mut d);
|
||||
|
||||
@@ -360,8 +360,8 @@ fn bench_decoder_100(b: &mut Bencher) {
|
||||
|
||||
fn run_deserializer<
|
||||
D: Deserializer<E>,
|
||||
E: Show,
|
||||
T: Clone + PartialEq + Show + Deserialize<D, E>
|
||||
E: Debug,
|
||||
T: Clone + PartialEq + Debug + Deserialize<D, E>
|
||||
>(mut d: D, value: T) {
|
||||
let v: T = Deserialize::deserialize(&mut d).unwrap();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ use serde::de::{Deserializer, Deserialize};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(Clone, PartialEq, Show, RustcDecodable)]
|
||||
#[derive(Clone, PartialEq, Debug, RustcDecodable)]
|
||||
#[derive_deserialize]
|
||||
struct Inner {
|
||||
a: (),
|
||||
@@ -26,7 +26,7 @@ struct Inner {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(Clone, PartialEq, Show, RustcDecodable)]
|
||||
#[derive(Clone, PartialEq, Debug, RustcDecodable)]
|
||||
#[derive_deserialize]
|
||||
struct Outer {
|
||||
inner: Vec<Inner>,
|
||||
@@ -34,7 +34,7 @@ struct Outer {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(Show)]
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
EndOfStream,
|
||||
SyntaxError(String),
|
||||
@@ -63,7 +63,7 @@ mod decoder {
|
||||
OptionState,
|
||||
};
|
||||
|
||||
#[derive(Show)]
|
||||
#[derive(Debug)]
|
||||
enum State {
|
||||
OuterState(Outer),
|
||||
InnerState(Inner),
|
||||
@@ -339,7 +339,7 @@ mod deserializer {
|
||||
EndState,
|
||||
};
|
||||
|
||||
#[derive(Show)]
|
||||
#[derive(Debug)]
|
||||
enum State {
|
||||
OuterState(Outer),
|
||||
InnerState(Inner),
|
||||
|
||||
@@ -7,7 +7,7 @@ extern crate serde;
|
||||
extern crate "rustc-serialize" as rustc_serialize;
|
||||
extern crate test;
|
||||
|
||||
use std::fmt::Show;
|
||||
use std::fmt::Debug;
|
||||
use test::Bencher;
|
||||
|
||||
use rustc_serialize::{Decoder, Decodable};
|
||||
@@ -16,7 +16,7 @@ use serde::de::{Deserializer, Deserialize};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(PartialEq, Show)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub enum Error {
|
||||
EndOfStream,
|
||||
SyntaxError,
|
||||
@@ -353,7 +353,7 @@ mod deserializer {
|
||||
|
||||
use serde::de;
|
||||
|
||||
#[derive(PartialEq, Show)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
enum State {
|
||||
StartState,
|
||||
SepOrEndState,
|
||||
@@ -513,7 +513,7 @@ mod deserializer {
|
||||
|
||||
fn run_decoder<
|
||||
D: Decoder<Error=Error>,
|
||||
T: Clone + PartialEq + Show + Decodable
|
||||
T: Clone + PartialEq + Debug + Decodable
|
||||
>(mut d: D, value: T) {
|
||||
let v = Decodable::decode(&mut d);
|
||||
|
||||
@@ -522,8 +522,8 @@ fn run_decoder<
|
||||
|
||||
fn run_deserializer<
|
||||
D: Deserializer<E>,
|
||||
E: Show,
|
||||
T: Clone + PartialEq + Show + Deserialize<D, E>
|
||||
E: Debug,
|
||||
T: Clone + PartialEq + Debug + Deserialize<D, E>
|
||||
>(mut d: D, value: T) {
|
||||
let v: T = Deserialize::deserialize(&mut d).unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user