mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +11:00
Merge pull request #310 from corwinkuiper/2022-09-23-linter
satisfy linter
This commit is contained in:
commit
123377be0f
|
@ -80,7 +80,7 @@ pub fn generate_upgrades(level: u32) -> Vec<Face> {
|
||||||
.chain(core::iter::once(&next))
|
.chain(core::iter::once(&next))
|
||||||
.filter(|&x| *x == Face::Malfunction)
|
.filter(|&x| *x == Face::Malfunction)
|
||||||
.count();
|
.count();
|
||||||
let maximum_number_of_malfunctions = if level < 5 { 0 } else { 1 };
|
let maximum_number_of_malfunctions = (level >= 5).into();
|
||||||
if upgrade_value(&upgrades, next) <= max_upgrade_value
|
if upgrade_value(&upgrades, next) <= max_upgrade_value
|
||||||
&& number_of_malfunctions <= maximum_number_of_malfunctions
|
&& number_of_malfunctions <= maximum_number_of_malfunctions
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue