Style and Clippy fixes.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -24,6 +24,12 @@ pub struct Gen7BattleStatCalculator {
|
||||
identifier: ValueIdentifier,
|
||||
}
|
||||
|
||||
impl Default for Gen7BattleStatCalculator {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Gen7BattleStatCalculator {
|
||||
/// Creates a new Gen 7 battle stat calculator
|
||||
pub fn new() -> Self {
|
||||
|
||||
@@ -224,11 +224,7 @@ impl DamageLibrary for Gen7DamageLibrary {
|
||||
|
||||
float_damage = (float_damage * hit_data.effectiveness()).floor();
|
||||
let mut damage = if float_damage <= 0.0 {
|
||||
if hit_data.effectiveness() == 0.0 {
|
||||
0
|
||||
} else {
|
||||
1
|
||||
}
|
||||
u32::from(hit_data.effectiveness() != 0.0)
|
||||
} else if float_damage >= u32::MAX as f32 {
|
||||
u32::MAX
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user