From f8883aaecf793da0c9757647762f31dd0e7dfe951cb7dcbfc7d2b3a53f0f8aa3 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Sun, 23 Jun 2024 00:00:00 +0000 Subject: Fix double borrows --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 23b4593..21182de 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -112,11 +112,11 @@ fn generate_to_buffer( * The first row has no preceding row, so it's computing using the column stitches */ cur_row.push(first_square); for col in 0..(cur_row.capacity() - 1) { - print_square(&mut stream, cur_row[col]); + print_square(stream, cur_row[col]); cur_row.push(cur_row[col] ^ col_bits[col]); } - print_square(&mut stream, cur_row[cur_row.capacity() - 1]); + print_square(stream, cur_row[cur_row.capacity() - 1]); stream.write_all(b"\n").unwrap(); // End of base case for row_bit in row_bits.iter() { @@ -128,7 +128,7 @@ fn generate_to_buffer( .zip(alt_bits.iter()) .for_each(|(x1, &x2)| { *x1 ^= x2 ^ row_bit; - print_square(&mut stream, *x1); + print_square(stream, *x1); }); stream.write_all(b"\n").unwrap(); // End of recursive case -- cgit v1.2.3