summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vtcol.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vtcol.rs b/src/vtcol.rs
index 665b600..c3344ce 100644
--- a/src/vtcol.rs
+++ b/src/vtcol.rs
@@ -358,7 +358,7 @@ impl Palette
pub fn new(colors: &[&str; PALETTE_SIZE]) -> Palette
{
let mut idx: usize = 0_usize;
- let mut pal: [u8; PALETTE_BYTES] = unsafe { std::mem::zeroed() };
+ let mut pal: [u8; PALETTE_BYTES] = [0; PALETTE_BYTES];
for def in colors.iter() {
let (r, g, b) = rgb_of_hex_triplet(*def);
@@ -381,7 +381,7 @@ impl Palette
pub fn from_buffered_reader(reader: &mut std::io::BufRead) -> Palette
{
let mut pal_idx: usize = 0_usize;
- let mut pal: [u8; PALETTE_BYTES] = unsafe { std::mem::zeroed() };
+ let mut pal: [u8; PALETTE_BYTES] = [0; PALETTE_BYTES];
let mut line: String = String::new();
while reader.read_line(&mut line).is_ok() {