Skip to content

Commit

Permalink
it helps to actually build with serde enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
bnavetta committed Aug 7, 2015
1 parent 00337d0 commit 8a2282f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/decoder/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl de::Deserializer for UnitDeserializer {

// Based on https://github.com/serde-rs/serde/blob/199ed417bd6afc2071d17759b8c7e0ab8d0ba4cc/serde_json/src/value.rs#L265
impl de::Deserialize for Value {
fn deserialize<D>(deserializer: &mut D) -> Result<Value, D::Error> {
fn deserialize<D>(deserializer: &mut D) -> Result<Value, D::Error> where D: de::Deserializer {
struct ValueVisitor;

impl de::Visitor for ValueVisitor {
Expand Down Expand Up @@ -319,5 +319,7 @@ impl de::Deserialize for Value {
Ok(Value::Table(values))
}
}

deserializer.visit(ValueVisitor)
}
}

0 comments on commit 8a2282f

Please sign in to comment.