Merge pull request #310 from corwinkuiper/2022-09-23-linter

satisfy linter
This commit is contained in:
Corwin 2022-09-23 13:34:52 +01:00 committed by GitHub
commit 123377be0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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