We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b87abae commit 53dd4f5Copy full SHA for 53dd4f5
examples/path_or_file_like/src/lib.rs
@@ -17,7 +17,7 @@ impl FileOrFileLike {
17
pub fn from_pyobject(path_or_file_like: PyObject) -> PyResult<FileOrFileLike> {
18
Python::with_gil(|py| {
19
// is a path
20
- if let Ok(string_ref) = path_or_file_like.downcast::<PyString>(py) {
+ if let Ok(string_ref) = path_or_file_like.downcast_bound::<PyString>(py) {
21
return Ok(FileOrFileLike::File(
22
string_ref.to_string_lossy().to_string(),
23
));
0 commit comments