Loads of cleanup
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2022-11-27 17:29:29 +01:00
parent aa3ceaed3e
commit efd1acdfa5
45 changed files with 259 additions and 162 deletions

View File

@@ -14,7 +14,6 @@ use crate::{PkmnResult, StringKey, ValueIdentifiable, ValueIdentifier};
/// The dynamic library stores a static data library, as well as holding different libraries and
/// calculators that might be customized between different generations and implementations.
#[derive(Debug)]
#[cfg_attr(feature = "wasm", derive(unique_type_id_derive::UniqueTypeId))]
pub struct DynamicLibrary {
/// A unique identifier so we know what value this is.
identifier: ValueIdentifier,
@@ -87,7 +86,7 @@ impl DynamicLibrary {
/// Loads an item script with the given unique key. If no script can be created with this
/// combinations, returns None. Note that ItemScripts are immutable, as their script should be
/// shared between all different usages.
pub fn load_item_script(&self, _key: &Arc<Item>) -> PkmnResult<Option<Arc<dyn ItemScript>>> {
pub fn load_item_script(&self, _key: &Arc<dyn Item>) -> PkmnResult<Option<Arc<dyn ItemScript>>> {
todo!()
}
}

View File

@@ -21,7 +21,7 @@ pub trait ScriptResolver: Debug + ValueIdentifiable {
/// Loads an item script with the given unique key. If no script can be created with this
/// combinations, returns None. Note that ItemScripts are immutable, as their script should be
/// shared between all different usages.
fn load_item_script(&self, _key: &Item) -> PkmnResult<Option<Arc<dyn ItemScript>>>;
fn load_item_script(&self, _key: &dyn Item) -> PkmnResult<Option<Arc<dyn ItemScript>>>;
}
use std::fmt::Display;
@@ -77,7 +77,7 @@ impl ScriptResolver for EmptyScriptResolver {
Ok(None)
}
fn load_item_script(&self, _key: &Item) -> PkmnResult<Option<Arc<dyn ItemScript>>> {
fn load_item_script(&self, _key: &dyn Item) -> PkmnResult<Option<Arc<dyn ItemScript>>> {
Ok(None)
}
}