diff --git a/src/conversion.rs b/src/conversion.rs index eec35a6f39e..a309a6d6e40 100644 --- a/src/conversion.rs +++ b/src/conversion.rs @@ -447,7 +447,6 @@ impl<'py, T> IntoPyObjectExt<'py> for T where T: IntoPyObject<'py> {} /// [`Cow<'a, str>`]: std::borrow::Cow /// [`Cow::Borrowed`]: std::borrow::Cow::Borrowed /// [`Cow::Owned`]: std::borrow::Cow::Owned - pub trait FromPyObject<'a, 'py>: Sized { /// Extracts `Self` from the bound smart pointer `obj`. /// diff --git a/src/conversions/std/osstr.rs b/src/conversions/std/osstr.rs index d9a6e4b932c..875608bed4a 100644 --- a/src/conversions/std/osstr.rs +++ b/src/conversions/std/osstr.rs @@ -226,7 +226,7 @@ impl<'py> IntoPyObject<'py> for &OsString { #[cfg(test)] mod tests { - use crate::types::{PyAnyMethods, PyString, PyStringMethods}; + use crate::types::{PyString, PyStringMethods}; use crate::{BoundObject, IntoPyObject, Python}; use std::fmt::Debug; use std::{ @@ -238,6 +238,7 @@ mod tests { #[cfg(not(windows))] fn test_non_utf8_conversion() { Python::with_gil(|py| { + use crate::types::PyAnyMethods; #[cfg(not(target_os = "wasi"))] use std::os::unix::ffi::OsStrExt; #[cfg(target_os = "wasi")] diff --git a/src/conversions/std/path.rs b/src/conversions/std/path.rs index 7b92b79420f..badb922fc9a 100644 --- a/src/conversions/std/path.rs +++ b/src/conversions/std/path.rs @@ -144,7 +144,7 @@ impl<'py> IntoPyObject<'py> for &PathBuf { #[cfg(test)] mod tests { - use crate::types::{PyAnyMethods, PyString, PyStringMethods}; + use crate::types::{PyString, PyStringMethods}; use crate::{BoundObject, IntoPyObject, Python}; use std::borrow::Cow; use std::fmt::Debug; @@ -154,6 +154,7 @@ mod tests { #[cfg(not(windows))] fn test_non_utf8_conversion() { Python::with_gil(|py| { + use crate::types::PyAnyMethods; use std::ffi::OsStr; #[cfg(not(target_os = "wasi"))] use std::os::unix::ffi::OsStrExt;