Clippy fixes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-02 11:25:36 +01:00
parent f2b0d3b9f3
commit aae41b93bb
11 changed files with 18 additions and 19 deletions

View File

@@ -261,7 +261,7 @@ extern "C" fn pokemon_is_ability_overriden(ptr: ExternPointer<Arc<Pokemon>>) ->
/// Returns the currently active ability.
#[no_mangle]
extern "C" fn pokemon_active_ability(ptr: ExternPointer<Arc<Pokemon>>) -> IdentifiablePointer<Arc<dyn Ability>> {
ptr.as_ref().active_ability().clone().into()
ptr.as_ref().active_ability().into()
}
/// Whether or not the Pokemon is allowed to gain experience.

View File

@@ -35,7 +35,7 @@ unsafe extern "C" fn nature_library_get_nature(
name: BorrowedPtr<c_char>,
) -> IdentifiablePointer<Arc<dyn Nature>> {
if let Some(nature) = ptr.as_ref().get_nature(&CStr::from_ptr(name).into()) {
nature.clone().into()
nature.into()
} else {
IdentifiablePointer::none()
}