Fixes a bunch of clippy warnings, adds clippy to CI
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-06-18 16:06:54 +02:00
parent 5576bc8b80
commit c99b1bf8d9
14 changed files with 42 additions and 27 deletions

View File

@@ -121,8 +121,8 @@ impl<'own, 'library> Battle<'own, 'library> {
pub fn event_hook(&self) -> &EventHook {
&self.event_hook
}
pub fn history_holder(&self) -> &Box<HistoryHolder> {
&self.history_holder
pub fn history_holder(&self) -> &HistoryHolder {
self.history_holder.deref()
}
pub fn current_turn(&self) -> u32 {
self.current_turn.load(Ordering::Relaxed)

View File

@@ -155,9 +155,9 @@ impl<'own, 'library> BattleSide<'own, 'library> {
battle.event_hook().trigger(Event::Switch {
side_index: self.index,
index,
pokemon: Some(&pokemon),
pokemon: Some(pokemon),
});
script_hook!(on_switch_in, pokemon, &pokemon);
script_hook!(on_switch_in, pokemon, pokemon);
} else {
self.battle().event_hook().trigger(Event::Switch {
side_index: self.index,