Skip to content

Commit

Permalink
Revert changes to set.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Jun 13, 2023
1 parent 5d5a9ab commit a77a1fd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/types/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ impl PySet {
unsafe { py.from_owned_ptr_or_err(ffi::PySet_New(ptr::null_mut())) }
}

/// Removes all elements from the set.
#[inline]
pub fn clear(&self) {
unsafe {
ffi::PySet_Clear(self.as_ptr());
}
}

/// Returns the number of items in the set.
///
/// This is equivalent to the Python expression `len(self)`.
Expand Down Expand Up @@ -105,14 +113,6 @@ impl PySet {
}
}

/// Removes all elements from the set.
#[inline]
pub fn clear(&self) {
unsafe {
ffi::PySet_Clear(self.as_ptr());
}
}

/// Returns an iterator of values in this set.
///
/// # Panics
Expand Down

0 comments on commit a77a1fd

Please sign in to comment.