Skip to content

Commit ce596dc

Browse files
Icxoludavidhewitt
andauthored
apply doc suggestions
Co-authored-by: David Hewitt <mail@davidhewitt.dev>
1 parent a1c0bed commit ce596dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

guide/src/migration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ With the removal of the `gil-ref` API it is now possible to fully split the Pyth
5050
GIL lifetime.
5151

5252
`FromPyObject` now takes an additional lifetime `'a` describing the input lifetime. The argument
53-
type of the `extract` method changed from `&Bound<'_, PyAny>` to `Borrowed<'_, '_, PyAny>`. This was
54-
done to lift the implicit restriction `'py: 'a` due to the reference type. `extract_bound` with it's
53+
type of the `extract` method changed from `&Bound<'py, PyAny>` to `Borrowed<'a, 'py, PyAny>`. This was
54+
done because `&'a Bound<'py, PyAny>` would have an implicit restriction `'py: 'a` due to the reference type. `extract_bound` with its
5555
old signature is deprecated, but still available during migration.
5656

5757
This new form was partly implemented already in 0.22 using the internal `FromPyObjectBound` trait and
5858
is now extended to all types.
5959

60-
Most implementation can just add an elided lifetime to migrate,
60+
Most implementations can just add an elided lifetime to migrate.
6161

6262
Before:
6363
```rust,ignore
@@ -79,7 +79,7 @@ impl<'py> FromPyObject<'_, 'py> for IpAddr {
7979
}
8080
```
8181

82-
but occasually more steps are neccessary. For generic types, the bounds need to be adjusted. The
82+
Occasionally, more steps are necessary. For generic types, the bounds need to be adjusted. The
8383
correct bound depends on how the type is used.
8484

8585
For simple wrapper types usually it's possible to just forward the bound.

0 commit comments

Comments
 (0)