Clippy fixes, additional WASM registration work
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-08-26 18:23:35 +02:00
parent 1e43c07d43
commit c5fb81c179
22 changed files with 219 additions and 101 deletions

View File

@@ -55,7 +55,7 @@ pub struct Battle {
script_source_data: RwLock<ScriptSourceData>,
}
impl<'own, 'library> Battle {
impl Battle {
/// Initializes a new battle.
pub fn new(
library: Arc<DynamicLibrary>,

View File

@@ -43,7 +43,7 @@ pub struct BattleSide {
script_source_data: RwLock<ScriptSourceData>,
}
impl<'own, 'library> BattleSide {
impl BattleSide {
/// Instantiates a battle side.
pub fn new(index: u8, pokemon_per_side: u8) -> Self {
let mut pokemon = Vec::with_capacity(pokemon_per_side as usize);

View File

@@ -260,7 +260,7 @@ impl Pokemon {
}
let script = self
.library
.load_item_script(&self.held_item.read().as_ref().unwrap())
.load_item_script(self.held_item.read().as_ref().unwrap())
.unwrap();
if script.is_none() {
return false;

View File

@@ -9,7 +9,7 @@ pub struct PokemonParty {
pokemon: Vec<Option<Arc<Pokemon>>>,
}
impl<'own, 'library> PokemonParty {
impl PokemonParty {
/// Instantiates a party with a set size.
pub fn new(size: usize) -> Self {
let mut pokemon = Vec::with_capacity(size);