fix: guide example for pyclass expansion

This commit is contained in:
David Hewitt 2022-02-07 07:46:12 +00:00 committed by GitHub
parent 9def53317f
commit 4fd01c3cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -861,7 +861,7 @@ impl pyo3::impl_::pyclass::PyClassImpl for MyClass {
fn for_all_items(visitor: &mut dyn FnMut(&pyo3::impl_::pyclass::PyClassItems)) {
use pyo3::impl_::pyclass::*;
let collector = PyClassImplCollector::<MyClass>::new();
static INTRINSIC_ITEMS: &PyClassItems = PyClassItems { slots: &[], methods: &[] };
static INTRINSIC_ITEMS: PyClassItems = PyClassItems { slots: &[], methods: &[] };
visitor(&INTRINSIC_ITEMS);
visitor(collector.py_methods());
}