Skip to content

Commit 447d6c4

Browse files
committed
convert FromPyObject impls to new bounds API
Signed-off-by: Luka Peschke <[email protected]>
1 parent f02c1a4 commit 447d6c4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/types/dtype.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ use std::{
77

88
use arrow::datatypes::{DataType as ArrowDataType, TimeUnit};
99
use calamine::{CellErrorType, CellType, DataType, Range};
10-
use pyo3::{types::PyString, FromPyObject, PyAny, PyObject, PyResult, Python, ToPyObject};
10+
use pyo3::{
11+
prelude::PyAnyMethods, types::PyString, Bound, FromPyObject, PyAny, PyObject, PyResult, Python,
12+
ToPyObject,
13+
};
1114

1215
use crate::error::{py_errors::IntoPyResult, FastExcelError, FastExcelErrorKind, FastExcelResult};
1316

@@ -68,7 +71,7 @@ impl ToPyObject for DType {
6871
}
6972

7073
impl FromPyObject<'_> for DType {
71-
fn extract(py_dtype: &PyAny) -> PyResult<Self> {
74+
fn extract_bound(py_dtype: &Bound<'_, PyAny>) -> PyResult<Self> {
7275
if let Ok(dtype_pystr) = py_dtype.extract::<&PyString>() {
7376
dtype_pystr.to_str()?.parse()
7477
} else {

0 commit comments

Comments
 (0)