Skip to content

Commit

Permalink
Updated to use PyO3's bound API
Browse files Browse the repository at this point in the history
  • Loading branch information
mailletf committed Aug 4, 2024
1 parent de2217c commit 0f4ec81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::collections::{HashSet, VecDeque};
#[pyfunction]
fn polygon_to_geohashes(
_py: Python,
py_polygon: &PyAny,
py_polygon: Bound<'_, PyAny>,
precision: usize,
inner: bool,
) -> PyResult<HashSet<String>> {
Expand Down Expand Up @@ -98,7 +98,7 @@ fn polygon_to_geohashes(
}

#[pymodule]
fn geohash_polygon(_py: Python, m: &PyModule) -> PyResult<()> {
fn geohash_polygon(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(polygon_to_geohashes, m)?)?;
Ok(())
}

0 comments on commit 0f4ec81

Please sign in to comment.