Skip to content

Commit

Permalink
Fix NSObject ptr methods
Browse files Browse the repository at this point in the history
Accidentally took self by value instead of by reference.
  • Loading branch information
nvzqz committed Sep 8, 2020
1 parent fa9d4da commit 298e7fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/objc/obj.rs
Expand Up @@ -87,13 +87,13 @@ impl NSObject {

/// Returns a raw nullable pointer to this object's data.
#[inline]
pub fn as_ptr(self) -> *mut c_void {
pub fn as_ptr(&self) -> *mut c_void {
self.0.as_ptr()
}

/// Returns a raw non-null pointer to this object's data.
#[inline]
pub fn as_non_null_ptr(self) -> NonNull<c_void> {
pub fn as_non_null_ptr(&self) -> NonNull<c_void> {
self.0.as_non_null_ptr()
}

Expand Down

0 comments on commit 298e7fd

Please sign in to comment.