Make Ability a trait
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-27 17:47:51 +01:00
parent 996a35ffa4
commit e04f61d9e6
9 changed files with 50 additions and 31 deletions

View File

@@ -116,7 +116,7 @@ impl Form {
}
/// Find the index of an ability that can be on this form.
pub fn find_ability_index(&self, ability: &Ability) -> Option<AbilityIndex> {
pub fn find_ability_index(&self, ability: &dyn Ability) -> Option<AbilityIndex> {
for (index, a) in self.abilities.iter().enumerate() {
if a == ability.name() {
return Some(AbilityIndex {