Skip to content

Commit

Permalink
Remove typying
Browse files Browse the repository at this point in the history
  • Loading branch information
JerzySpendel committed Mar 4, 2022
1 parent 43d4f5e commit eaa82b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions guide/src/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ we are *not* holding the GIL?

```rust
let hello: Py<PyString> = Python::with_gil(|py| {
Py<PyString> = py.eval("\"Hello World!\"", None, None)?.extract())
py.eval("\"Hello World!\"", None, None)?.extract())
})?;
// Do some stuff...
// Now sometime later in the program we want to access `hello`.
Expand All @@ -155,7 +155,7 @@ We can avoid the delay in releasing memory if we are careful to drop the

```rust
let hello: Py<PyString> = Python::with_gil(|py| {
Py<PyString> = py.eval("\"Hello World!\"", None, None)?.extract())
py.eval("\"Hello World!\"", None, None)?.extract())
})?;
// Do some stuff...
// Now sometime later in the program:
Expand All @@ -173,7 +173,7 @@ until the GIL is dropped.

```rust
let hello: Py<PyString> = Python::with_gil(|py| {
Py<PyString> = py.eval("\"Hello World!\"", None, None)?.extract())
py.eval("\"Hello World!\"", None, None)?.extract())
})?;
// Do some stuff...
// Now sometime later in the program:
Expand Down

0 comments on commit eaa82b2

Please sign in to comment.