diff options
| author | Ubuntu <github@matdoes.dev> | 2022-11-15 20:38:32 +0000 |
|---|---|---|
| committer | Ubuntu <github@matdoes.dev> | 2022-11-15 20:38:32 +0000 |
| commit | 614c0df0537567c75f781df7affc091a4a466226 (patch) | |
| tree | ffd4b23e4692cbdd6c966d389901fbe24d0ad76b /azalea-world/src/entity/attributes.rs | |
| parent | 9f78b3f4a7229033a3f5acaad6c8fffbe24e3e75 (diff) | |
| download | azalea-drasl-614c0df0537567c75f781df7affc091a4a466226.tar.xz | |
clippy
Diffstat (limited to 'azalea-world/src/entity/attributes.rs')
| -rw-r--r-- | azalea-world/src/entity/attributes.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/azalea-world/src/entity/attributes.rs b/azalea-world/src/entity/attributes.rs index 1050615c..f7e9682e 100644 --- a/azalea-world/src/entity/attributes.rs +++ b/azalea-world/src/entity/attributes.rs @@ -40,9 +40,8 @@ impl AttributeInstance { AttributeModifierOperation::MultiplyBase => total += self.base * modifier.amount, _ => {} } - match modifier.operation { - AttributeModifierOperation::MultiplyTotal => total *= 1.0 + modifier.amount, - _ => {} + if let AttributeModifierOperation::MultiplyTotal = modifier.operation { + total *= 1.0 + modifier.amount } } total |
