Simplify a bit the sum (to sum boolean with integer is possible)
authorGreg Burri <greg.burri@gmail.com>
Wed, 2 Dec 2020 09:04:01 +0000 (10:04 +0100)
committerGreg Burri <greg.burri@gmail.com>
Wed, 2 Dec 2020 09:04:01 +0000 (10:04 +0100)
main.jl

diff --git a/main.jl b/main.jl
index 0c257ac..dd5e7f5 100644 (file)
--- a/main.jl
+++ b/main.jl
@@ -284,7 +284,7 @@ function nb_of_valid_passwords_part1(passwords :: AbstractArray{Password})
                        for c in password.p
                                m += c == password.policy_char
                        end
-                       if m ∈ password.policy_range 1 else 0 end
+                       m ∈ password.policy_range
                end,
                passwords
        )