Skip to content

Commit eca3aa9

Browse files
committed
fixup doc
1 parent 8795748 commit eca3aa9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

guide/src/class.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,12 @@ unsafe impl pyo3::type_object::PyTypeInfo for MyClass {
13851385
#[inline]
13861386
fn type_object_raw(py: pyo3::Python<'_>) -> *mut pyo3::ffi::PyTypeObject {
13871387
<Self as pyo3::impl_::pyclass::PyClassImpl>::lazy_type_object()
1388-
.get_or_init(py)
1388+
.get_or_try_init(py)
1389+
.unwrap_or_else(|e| pyo3::impl_::pyclass::type_object_init_failed(
1390+
py,
1391+
e,
1392+
<Self as pyo3::type_object::PyTypeInfo>::NAME
1393+
))
13891394
.as_type_ptr()
13901395
}
13911396
}

0 commit comments

Comments
 (0)