From ca329f0fe0d9721ca74c185971073bc849fec1f4 Mon Sep 17 00:00:00 2001 From: GwnDaan Date: Thu, 14 Dec 2023 17:42:33 +0100 Subject: [PATCH] fix(vt): colour_map not initializing --- src/object_pool/mod.rs | 2 +- src/object_pool/object_pool.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/object_pool/mod.rs b/src/object_pool/mod.rs index 5b0a3b0..aab41de 100644 --- a/src/object_pool/mod.rs +++ b/src/object_pool/mod.rs @@ -3,7 +3,7 @@ pub mod reader; pub mod writer; pub mod object; -mod object_attributes; +pub mod object_attributes; mod object_id; mod object_pool; mod object_type; diff --git a/src/object_pool/object_pool.rs b/src/object_pool/object_pool.rs index 59edab3..952315b 100644 --- a/src/object_pool/object_pool.rs +++ b/src/object_pool/object_pool.rs @@ -23,8 +23,8 @@ impl ObjectPool { pub fn new() -> Self { // Setup the default colour map let mut colour_map = [0xFFu8; 256]; - for i in 0..(colour_map.len() as u8) { - colour_map[i as usize] = i; + for i in 0..colour_map.len() { + colour_map[i] = i as u8; } ObjectPool {