From 13d24b1493dbd52cfbe2290d3871e69641bd1cfcc6bdcc62dc766e8562f5b057 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Sat, 20 Apr 2024 00:00:00 +0000 Subject: Correct alt_bits' initial capacity --- src/hitomezashi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hitomezashi.rs') diff --git a/src/hitomezashi.rs b/src/hitomezashi.rs index 2b1e9ea..a14296a 100644 --- a/src/hitomezashi.rs +++ b/src/hitomezashi.rs @@ -53,7 +53,7 @@ pub fn hitomezashi(width: usize, height: usize, skew: Option) { col_bits.push(brn.sample(&mut rng)); } - let mut alt_bits: Vec = Vec::with_capacity(width - 1); + let mut alt_bits: Vec = Vec::with_capacity(width); for col in 0..width { alt_bits.push(col % 2 == 1); -- cgit v1.2.3