diff options
-rw-r--r-- | src/encoder/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoder/mod.rs b/src/encoder/mod.rs index 8137c33..35e7212 100644 --- a/src/encoder/mod.rs +++ b/src/encoder/mod.rs @@ -171,7 +171,7 @@ pub fn encode<T: ::rustc_serialize::Encodable>(t: &T) -> Value { #[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] pub fn encode<T: ::serde::Serialize>(t: &T) -> Value { let mut e = Encoder::new(); - t.deserialize(&mut e).unwrap(); + t.serialize(&mut e).unwrap(); Value::Table(e.toml) } |