day2: remove unnecessary lambda

This commit is contained in:
Johannes Loher 2020-12-02 11:59:13 +01:00
parent 2b24063138
commit ed0eb9c2c4
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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)