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: &T) -> Value { #[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))] pub fn encode(t: &T) -> Value { let mut e = Encoder::new(); - t.deserialize(&mut e).unwrap(); + t.serialize(&mut e).unwrap(); Value::Table(e.toml) }