mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-29 16:27:55 +00:00
Follow rust std: fmt::Show was renamed to fmt::Debug
This commit is contained in:
+6
-6
@@ -665,7 +665,7 @@ mod tests {
|
||||
use std::iter;
|
||||
use std::vec;
|
||||
|
||||
#[derive(Show)]
|
||||
#[derive(Debug)]
|
||||
enum Token<'a> {
|
||||
Bool(bool),
|
||||
Isize(isize),
|
||||
@@ -715,7 +715,7 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
enum Error {
|
||||
SyntaxError,
|
||||
EndOfStreamError,
|
||||
@@ -973,7 +973,7 @@ mod tests {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
#[derive(Copy, PartialEq, Debug)]
|
||||
struct NamedUnit;
|
||||
|
||||
impl Deserialize for NamedUnit {
|
||||
@@ -1015,7 +1015,7 @@ mod tests {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(PartialEq, Show)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
struct NamedSeq(i32, i32, i32);
|
||||
|
||||
impl Deserialize for NamedSeq {
|
||||
@@ -1067,7 +1067,7 @@ mod tests {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(PartialEq, Show)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
struct NamedMap {
|
||||
a: i32,
|
||||
b: i32,
|
||||
@@ -1152,7 +1152,7 @@ mod tests {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[derive(PartialEq, Show)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
enum Enum {
|
||||
Unit,
|
||||
Seq(i32, i32, i32),
|
||||
|
||||
@@ -529,7 +529,7 @@ pub fn from_str<'a, T>(s: &'a str) -> Result<T, Error>
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::str;
|
||||
use std::fmt::Show;
|
||||
use std::fmt::Debug;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use de::Deserialize;
|
||||
@@ -545,7 +545,7 @@ mod tests {
|
||||
}
|
||||
|
||||
fn test_parse_ok<'a, T>(errors: Vec<(&'a str, T)>)
|
||||
where T: PartialEq + Show + Deserialize,
|
||||
where T: PartialEq + Debug + Deserialize,
|
||||
{
|
||||
for (s, value) in errors.into_iter() {
|
||||
let v: Result<T, Error> = from_str(s);
|
||||
@@ -559,7 +559,7 @@ mod tests {
|
||||
}
|
||||
|
||||
fn test_parse_err<'a, T>(errors: Vec<(&'a str, Error)>)
|
||||
where T: PartialEq + Show + Deserialize
|
||||
where T: PartialEq + Debug + Deserialize
|
||||
{
|
||||
for (s, err) in errors.into_iter() {
|
||||
let v: Result<T, Error> = from_str(s);
|
||||
|
||||
@@ -37,7 +37,7 @@ pub enum ErrorCode {
|
||||
UnrecognizedHex,
|
||||
}
|
||||
|
||||
impl fmt::Show for ErrorCode {
|
||||
impl fmt::Debug for ErrorCode {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
//ErrorCode::ConversionError(ref token) => write!(f, "failed to convert {}", token),
|
||||
@@ -75,7 +75,7 @@ impl fmt::Show for ErrorCode {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Show)]
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub enum Error {
|
||||
/// msg, line, col
|
||||
SyntaxError(ErrorCode, usize, usize),
|
||||
|
||||
@@ -57,7 +57,7 @@ impl<'a, 'b> io::Writer for WriterFormatter<'a, 'b> {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Show for Value {
|
||||
impl fmt::Debug for Value {
|
||||
/// Serializes a json value into a string
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut wr = WriterFormatter { inner: f };
|
||||
|
||||
+1
-1
@@ -651,7 +651,7 @@ mod tests {
|
||||
use std::vec;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
#[derive(Clone, PartialEq, Show)]
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub enum Token<'a> {
|
||||
Bool(bool),
|
||||
Isize(isize),
|
||||
|
||||
Reference in New Issue
Block a user