Made Tm_ a struct instead of a record and added serialization support to Tm and Tm_.

Not entirely clear what the best way to do this is. Right now we persist the entire
struct which seems to be both portable and exactly round-trippable.
This commit is contained in:
Jesse Jones 2012-11-25 20:54:19 -08:00 committed by Erick Tryzelaar
parent 7bc29c62d0
commit a18f0d413c
2 changed files with 82 additions and 17 deletions

View file

@ -10,6 +10,7 @@ use EBWriter = std::ebml::Writer;
use io::Writer;
use std::serialization::{Serializable, Deserializable, deserialize};
use std::prettyprint;
use std::time;
fn test_prettyprint<A: Serializable<prettyprint::Serializer>>(
a: &A,
@ -184,4 +185,7 @@ fn main() {
let a = &B;
test_prettyprint(a, &~"B");
test_ebml(a);
let a = &time::now();
test_ebml(a);
}