mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +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))
|
||||
.filter(|&x| *x == Face::Malfunction)
|
||||
.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
|
||||
&& number_of_malfunctions <= maximum_number_of_malfunctions
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue