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

This commit is contained in:
2023-06-24 15:05:58 +02:00
parent 78bb91093b
commit 3400d9ec1e
12 changed files with 61 additions and 4 deletions

View File

@@ -543,7 +543,7 @@ impl Pokemon {
/// Change the form of the Pokemon.
pub fn change_form(&self, form: &Arc<dyn Form>) -> Result<()> {
if Arc::ptr_eq(&self.form(), form) {
if self.form().eq(form.deref()) {
return Ok(());
}
*self.data.form.write() = form.clone();
@@ -816,6 +816,7 @@ impl Pokemon {
}
}
/// Gets the inner pointer to the reference counted data.
pub fn as_ptr(&self) -> *const c_void {
Arc::as_ptr(&self.data) as *const c_void
}