aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicholasjohnson.ch>2024-04-20 00:00:00 +0000
committerNicholas Johnson <nick@nicholasjohnson.ch>2024-04-20 00:00:00 +0000
commit13d24b1493dbd52cfbe2290d3871e69641bd1cfcc6bdcc62dc766e8562f5b057 (patch)
tree225dc496fc13a2d5df0facae8287895b36c2b47310af7be2b3b59f2eed436651 /src
parent18642a29bf8da4b2a8ebee3733bd42e1c84b4945036c614f2054803d36f02795 (diff)
downloadhitomezashi-rs-13d24b1493dbd52cfbe2290d3871e69641bd1cfcc6bdcc62dc766e8562f5b057.tar.gz
hitomezashi-rs-13d24b1493dbd52cfbe2290d3871e69641bd1cfcc6bdcc62dc766e8562f5b057.zip
Correct alt_bits' initial capacity
Diffstat (limited to 'src')
-rw-r--r--src/hitomezashi.rs2
1 files changed, 1 insertions, 1 deletions
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<f64>) {
col_bits.push(brn.sample(&mut rng));
}
- let mut alt_bits: Vec<bool> = Vec::with_capacity(width - 1);
+ let mut alt_bits: Vec<bool> = Vec::with_capacity(width);
for col in 0..width {
alt_bits.push(col % 2 == 1);