mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-11-13 02:57:06 +00:00
Use the right show impl for Json
This commit is contained in:
1 parent
2380321c60
commit
ea5936aa78
1 file changed
+1
-3
@@ -252,7 +252,7 @@ use serialize;
|
|||||||
use serialize::{Encoder, Encodable};
|
use serialize::{Encoder, Encodable};
|
||||||
|
|
||||||
/// Represents a json value
|
/// Represents a json value
|
||||||
#[deriving(Clone, Eq, Show)]
|
#[deriving(Clone, Eq)]
|
||||||
pub enum Json {
|
pub enum Json {
|
||||||
Null,
|
Null,
|
||||||
Boolean(bool),
|
Boolean(bool),
|
||||||
@@ -2533,14 +2533,12 @@ impl<A:ToJson> ToJson for Option<A> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
impl fmt::Show for Json {
|
impl fmt::Show for Json {
|
||||||
/// Encodes a json value into a string
|
/// Encodes a json value into a string
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
self.to_writer(f).map_err(|_| fmt::WriteError)
|
self.to_writer(f).map_err(|_| fmt::WriteError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|||||||
Reference in new issue
Block a user