From 71bff985c1ba45b947ac0354e8bf662585f0e7bf Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Sat, 19 Nov 2022 17:02:22 +0100 Subject: [PATCH] make loop for smallest_dimension_yet inclusive --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index fceddd7..0b24781 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -380,7 +380,7 @@ impl Grid { // Instead of numbers of columns, try to find the fewest number of *lines* // that the output will fit in. let mut smallest_dimensions_yet = None; - for num_lines in (1 .. theoretical_max_num_lines).rev() { + for num_lines in (1..=theoretical_max_num_lines).rev() { // The number of columns is the number of cells divided by the number // of lines, *rounded up*.