dummy->default
Getty Ritter
6 years ago
74 | 74 | |
75 | 75 | /// Create a new fresh document with an empty 32x32 image, a |
76 | 76 | /// configured tile size of 16x16, and no rules |
77 |
pub fn d |
|
77 | pub fn default() -> Document { | |
78 | 78 | Document { |
79 | 79 | tilesheet: image::DynamicImage::new_rgb8(32, 32), |
80 | 80 | metadata: Metadata { |
96 | 96 | fn round_trip() { |
97 | 97 | // First, save our dummy `Document` to an in-memory buffer |
98 | 98 | let mut buf = Cursor::new(Vec::new()); |
99 |
let doc1 = Document::d |
|
99 | let doc1 = Document::default(); | |
100 | 100 | doc1.save_to_file(&mut buf).unwrap(); |
101 | 101 | |
102 | 102 | // then take that buffer back, and reparse it |