Fixes for newer clippy
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2023-09-24 18:24:02 +02:00
parent d8b8559c2e
commit e666bb5a0e
11 changed files with 22 additions and 53 deletions

View File

@@ -253,7 +253,7 @@ impl Battle {
data.target_side(),
data.target_index(),
data.used_move().move_data().target(),
choice.user().deref(),
choice.user(),
) {
return false;
}

View File

@@ -233,3 +233,7 @@ impl ScriptSource for ExecutingMove {
Ok(())
}
}
unsafe impl Send for ExecutingMove {}
unsafe impl Sync for ExecutingMove {}

View File

@@ -137,9 +137,9 @@ pub struct WeakPokemonReference {
data: Weak<PokemonData>,
}
unsafe impl Send for WeakPokemonReference {}
unsafe impl Send for PokemonData {}
unsafe impl Sync for WeakPokemonReference {}
unsafe impl Sync for PokemonData {}
impl Pokemon {
/// Instantiates a new Pokemon.

View File

@@ -104,9 +104,9 @@ impl Into<anyhow_ext::Result<SerializedPokemon>> for &Pokemon {
weight: self.weight(),
height: self.height(),
happiness: self.happiness(),
stat_boosts: self.stat_boosts().deref().deref().clone(),
individual_values: self.individual_values().deref().deref().clone(),
effort_values: self.effort_values().deref().deref().clone(),
stat_boosts: self.stat_boosts().deref().clone(),
individual_values: self.individual_values().deref().clone(),
effort_values: self.effort_values().deref().clone(),
nature: self.library().static_data().natures().get_nature_name(self.nature())?,
nickname: self.nickname().clone(),
ability_index: *self.real_ability(),