From cbefbb00126561597dcd0d32d97f82f6d6cce550 Mon Sep 17 00:00:00 2001 From: Taylor Holliday Date: Sun, 2 Oct 2022 19:59:28 -0700 Subject: [PATCH] Cleanup --- src/atlas.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/atlas.rs b/src/atlas.rs index e8e930c..40d5b4a 100644 --- a/src/atlas.rs +++ b/src/atlas.rs @@ -80,13 +80,7 @@ impl Atlas { let sz = Atlas::ATLAS_SIZE as usize; - let mut data = vec![]; - data.reserve(sz * sz); - for _ in 0..sz { - for _ in 0..sz { - data.push(0 as u8); - } - } + let data = vec![0_u8;sz * sz]; let buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { label: Some("atlas temp buffer"),