Fix doctests

This commit is contained in:
Blaž Šnuderl 2024-02-03 20:44:48 +01:00
parent 5e9d97d1c6
commit 7e94da576d
2 changed files with 3 additions and 3 deletions

View File

@ -98,7 +98,7 @@ Before:
Python::with_gil(|py| {
let a: PyObject = py.None();
let b: &PyAny = py.None().as_ref(py); // or into_ref(py)
// let b: &PyAny = py.None().as_ref(py); // or into_ref(py)
});
```
@ -111,7 +111,7 @@ Python::with_gil(|py| {
let a: PyObject = py.None().into_py(py);
// For uses needing &PyAny, remove `.as_ref(py)`
let b: &PyAny = py.None();
// let b: &PyAny = py.None();
});
```

View File

@ -474,7 +474,7 @@ class House(object):
Ok(_) => {
let none = py.None();
house
.call_method1("__exit__", (&none, &none, &none))
.call_method1("__exit__", (none, none, none))
.unwrap();
}
Err(e) => {