docs: fix example in types.md (#4028)

This commit is contained in:
Weijie Guo 2024-03-31 16:03:38 +08:00 committed by GitHub
parent cff4aa3cc8
commit 3af9a1f4e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ Or, without the type annotations:
use pyo3::prelude::*;
use pyo3::types::PyList;
# fn example(py: Python<'_>) -> PyResult<()> {
fn example(py: Python<'_>) -> PyResult<()> {
let x = PyList::empty_bound(py);
x.append(1)?;
let y = x.clone();