Skip to content

Commit

Permalink
remove unneccessary unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
Icxolu committed Feb 24, 2024
1 parent bf7ee7f commit cb4e6e7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/impl_/pymethods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,7 @@ impl<'a, 'py> BoundRef<'a, 'py, PyAny> {
Bound::ref_from_ptr_or_opt(py, ptr).as_ref().map(BoundRef)
}

pub unsafe fn downcast<T: PyTypeCheck>(
self,
) -> Result<BoundRef<'a, 'py, T>, DowncastError<'a, 'py>> {
pub fn downcast<T: PyTypeCheck>(self) -> Result<BoundRef<'a, 'py, T>, DowncastError<'a, 'py>> {
self.0.downcast::<T>().map(BoundRef)
}

Expand Down

0 comments on commit cb4e6e7

Please sign in to comment.