gdritter repos palladio / a5e5b21
dummy->default Getty Ritter 5 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Collapse all Expand all
7474
7575 /// Create a new fresh document with an empty 32x32 image, a
7676 /// configured tile size of 16x16, and no rules
77 pub fn dummy() -> Document {
77 pub fn default() -> Document {
7878 Document {
7979 tilesheet: image::DynamicImage::new_rgb8(32, 32),
8080 metadata: Metadata {
9696 fn round_trip() {
9797 // First, save our dummy `Document` to an in-memory buffer
9898 let mut buf = Cursor::new(Vec::new());
99 let doc1 = Document::dummy();
99 let doc1 = Document::default();
100100 doc1.save_to_file(&mut buf).unwrap();
101101
102102 // then take that buffer back, and reparse it