Skip to content

Commit

Permalink
Pull deserialization impls into their own file
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed Mar 26, 2015
1 parent 44edfa5 commit 1b1c605
Show file tree
Hide file tree
Showing 5 changed files with 455 additions and 443 deletions.
12 changes: 6 additions & 6 deletions benches/bench_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl de::Deserialize for HttpProtocol {
fn deserialize<
S: Deserializer,
>(state: &mut S) -> Result<HttpProtocol, S::Error> {
state.visit(de::PrimitiveVisitor::new())
state.visit(de::impls::PrimitiveVisitor::new())
}
}

Expand Down Expand Up @@ -114,7 +114,7 @@ impl de::Deserialize for HttpMethod {
fn deserialize<
S: de::Deserializer,
>(state: &mut S) -> Result<HttpMethod, S::Error> {
state.visit(de::PrimitiveVisitor::new())
state.visit(de::impls::PrimitiveVisitor::new())
}
}

Expand Down Expand Up @@ -155,7 +155,7 @@ impl de::Deserialize for CacheStatus {
fn deserialize<
S: de::Deserializer,
>(state: &mut S) -> Result<CacheStatus, S::Error> {
state.visit(de::PrimitiveVisitor::new())
state.visit(de::impls::PrimitiveVisitor::new())
}
}

Expand Down Expand Up @@ -203,7 +203,7 @@ impl de::Deserialize for OriginProtocol {
fn deserialize<
S: de::Deserializer,
>(state: &mut S) -> Result<OriginProtocol, S::Error> {
state.visit(de::PrimitiveVisitor::new())
state.visit(de::impls::PrimitiveVisitor::new())
}
}

Expand Down Expand Up @@ -245,7 +245,7 @@ impl de::Deserialize for ZonePlan {
fn deserialize<
S: de::Deserializer,
>(state: &mut S) -> Result<ZonePlan, S::Error> {
state.visit(de::PrimitiveVisitor::new())
state.visit(de::impls::PrimitiveVisitor::new())
}
}

Expand Down Expand Up @@ -538,7 +538,7 @@ impl de::Deserialize for Country {
fn deserialize<
S: de::Deserializer,
>(state: &mut S) -> Result<Country, S::Error> {
state.visit(de::PrimitiveVisitor::new())
state.visit(de::impls::PrimitiveVisitor::new())
}
}

Expand Down
2 changes: 1 addition & 1 deletion serde_macros/src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ fn deserialize_variant(
match variant.node.kind {
ast::TupleVariantKind(ref args) if args.is_empty() => {
quote_expr!(cx, {
try!(visitor.visit_value(::serde::de::UnitVisitor));
try!(visitor.visit_value(::serde::de::impls::UnitVisitor));
Ok($type_ident::$variant_ident)
})
}
Expand Down
Loading

0 comments on commit 1b1c605

Please sign in to comment.