perf: Minor tweak to length check
Some checks are pending
test / test (push) Waiting to run

This commit is contained in:
2025-11-04 15:17:01 +00:00
parent 3569a0a1af
commit 36e14f0070

View File

@@ -385,8 +385,8 @@ fn is_valid_internal(word: String, length: Int) -> Bool {
| "y" <> rest -> { | "y" <> rest -> {
case length { case length {
0 -> string.byte_size(rest) >= 2 0 -> string.byte_size(rest) >= 2
_ if length > 1 -> True 1 -> rest != ""
_ -> rest != "" _ -> True
} }
} }
"b" <> rest "b" <> rest