mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 20:11:02 +00:00
nits and rebase fallout
This commit is contained in:
committed by
Oliver Schneider
parent
24787195a1
commit
8f8fc6f3ff
@@ -61,12 +61,12 @@
|
|||||||
//! //#![feature(custom_derive, plugin)]
|
//! //#![feature(custom_derive, plugin)]
|
||||||
//! //#![plugin(serde_macros)]
|
//! //#![plugin(serde_macros)]
|
||||||
//!
|
//!
|
||||||
//! extern crate serde;
|
//! extern crate serde_json;
|
||||||
//!
|
//!
|
||||||
//! use serde_json::{self, Value};
|
//! use serde_json::Value;
|
||||||
//!
|
//!
|
||||||
//! fn main() {
|
//! fn main() {
|
||||||
//! let data: Value = json::from_str("{\"foo\": 13, \"bar\": \"baz\"}").unwrap();
|
//! let data: Value = serde_json::from_str("{\"foo\": 13, \"bar\": \"baz\"}").unwrap();
|
||||||
//! println!("data: {:?}", data);
|
//! println!("data: {:?}", data);
|
||||||
//! // data: {"bar":"baz","foo":13}
|
//! // data: {"bar":"baz","foo":13}
|
||||||
//! println!("object? {}", data.is_object());
|
//! println!("object? {}", data.is_object());
|
||||||
|
|||||||
@@ -767,7 +767,7 @@ impl<'a> de::VariantVisitor for VariantDeserializer<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_map<V>(&mut self, visitor: V) -> Result<V::Value, Error>
|
fn visit_map<V>(&mut self, _fields: &'static[&'static str], visitor: V) -> Result<V::Value, Error>
|
||||||
where V: de::Visitor,
|
where V: de::Visitor,
|
||||||
{
|
{
|
||||||
if let Value::Object(fields) = self.val.take().unwrap() {
|
if let Value::Object(fields) = self.val.take().unwrap() {
|
||||||
|
|||||||
Reference in New Issue
Block a user