diff options
-rw-r--r-- | src/hitomezashi.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hitomezashi.rs b/src/hitomezashi.rs index 88ba387..e8d4a65 100644 --- a/src/hitomezashi.rs +++ b/src/hitomezashi.rs @@ -36,13 +36,15 @@ pub fn hitomezashi(width: usize, height: usize, skew: Option<f64>) { // the first square (upper left corner) is always transparent let init_bit: bool = true; + let mut row_bits: Vec<bool> = Vec::with_capacity(height - 1); - let mut col_bits: Vec<bool> = Vec::with_capacity(width - 1); for _ in 0..(height - 1) { row_bits.push(brn.sample(&mut rng)); } + let mut col_bits: Vec<bool> = Vec::with_capacity(width - 1); + for _ in 0..(width - 1) { col_bits.push(brn.sample(&mut rng)); } |