From ed0eb9c2c4ff8a0c2a360ea9478e47df7050c03e Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 2 Dec 2020 11:59:13 +0100 Subject: [PATCH] day2: remove unnecessary lambda --- day2/part1/main.d | 2 +- day2/part2/main.d | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/day2/part1/main.d b/day2/part1/main.d index a1a3eb1..3c0dfdb 100644 --- a/day2/part1/main.d +++ b/day2/part1/main.d @@ -10,7 +10,7 @@ alias PasswordWithPolicy = Tuple!(ulong, ulong, char, string); ulong findNumberOfValidPasswords(PasswordWithPolicy[] passwords) { - return passwords.filter!(password => password.isPasswordValid).count; + return passwords.filter!isPasswordValid.count; } bool isPasswordValid(PasswordWithPolicy password) diff --git a/day2/part2/main.d b/day2/part2/main.d index 37d8456..048954f 100644 --- a/day2/part2/main.d +++ b/day2/part2/main.d @@ -12,7 +12,7 @@ alias PasswordWithPolicy = Tuple!(size_t, size_t, char, string); ulong findNumberOfValidPasswords(const PasswordWithPolicy[] passwords) { - return passwords.filter!(password => password.isPasswordValid).count; + return passwords.filter!isPasswordValid.count; } bool isPasswordValid(const PasswordWithPolicy password)