Skip to content

Commit

Permalink
fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
Icxolu committed Oct 5, 2024
1 parent f7b1f0f commit 9eac120
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions guide/src/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ where
{
fn extract_bound(obj: &Bound<'py, PyAny>) -> PyResult<Self> {
let mut v = MyVec(Vec::new());
for item in obj.iter()? {
for item in obj.try_iter()? {
v.0.push(item?.extract::<T>()?);
}
Ok(v)
Expand All @@ -380,7 +380,7 @@ where
{
fn extract(obj: Borrowed<'_, 'py, PyAny>) -> PyResult<Self> {
let mut v = MyVec(Vec::new());
for item in obj.iter()? {
for item in obj.try_iter()? {
v.0.push(item?.extract::<T>()?);
}
Ok(v)
Expand Down
2 changes: 1 addition & 1 deletion src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ pub trait FromPyObject<'a, 'py>: Sized {
/// {
/// fn extract(obj: Borrowed<'_, 'py, PyAny>) -> PyResult<Self> {
/// let mut v = MyVec(Vec::new());
/// for item in obj.iter()? {
/// for item in obj.try_iter()? {
/// v.0.push(item?.extract::<T>()?);
/// }
/// Ok(v)
Expand Down

0 comments on commit 9eac120

Please sign in to comment.