day2: remove unnecessary lambda
This commit is contained in:
parent
2b24063138
commit
ed0eb9c2c4
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ alias PasswordWithPolicy = Tuple!(ulong, ulong, char, string);
|
||||||
|
|
||||||
ulong findNumberOfValidPasswords(PasswordWithPolicy[] passwords)
|
ulong findNumberOfValidPasswords(PasswordWithPolicy[] passwords)
|
||||||
{
|
{
|
||||||
return passwords.filter!(password => password.isPasswordValid).count;
|
return passwords.filter!isPasswordValid.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isPasswordValid(PasswordWithPolicy password)
|
bool isPasswordValid(PasswordWithPolicy password)
|
||||||
|
|
|
@ -12,7 +12,7 @@ alias PasswordWithPolicy = Tuple!(size_t, size_t, char, string);
|
||||||
|
|
||||||
ulong findNumberOfValidPasswords(const PasswordWithPolicy[] passwords)
|
ulong findNumberOfValidPasswords(const PasswordWithPolicy[] passwords)
|
||||||
{
|
{
|
||||||
return passwords.filter!(password => password.isPasswordValid).count;
|
return passwords.filter!isPasswordValid.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isPasswordValid(const PasswordWithPolicy password)
|
bool isPasswordValid(const PasswordWithPolicy password)
|
||||||
|
|
Loading…
Reference in a new issue