Skip to content

Commit

Permalink
ignore clippy lint about interior mutability
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Aug 14, 2024
1 parent 126c97b commit 162a65e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyo3-ffi/src/moduleobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ pub struct PyModuleDef_Base {
pub m_copy: *mut PyObject,
}

#[allow(clippy::declare_interior_mutable_const)]
pub const PyModuleDef_HEAD_INIT: PyModuleDef_Base = PyModuleDef_Base {
ob_base: PyObject_HEAD_INIT,
m_init: None,
Expand Down
1 change: 1 addition & 0 deletions pyo3-ffi/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub const _Py_IMMORTAL_REFCNT_LOCAL: u32 = u32::MAX;
#[cfg(Py_GIL_DISABLED)]
pub const _Py_REF_SHARED_SHIFT: isize = 2;

#[allow(clippy::declare_interior_mutable_const)]
pub const PyObject_HEAD_INIT: PyObject = PyObject {
#[cfg(py_sys_config = "Py_TRACE_REFS")]
_ob_next: std::ptr::null_mut(),
Expand Down
1 change: 1 addition & 0 deletions src/impl_/pymodule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ impl ModuleDef {
doc: &'static CStr,
initializer: ModuleInitializer,
) -> Self {
#[allow(clippy::declare_interior_mutable_const)]
const INIT: ffi::PyModuleDef = ffi::PyModuleDef {
m_base: ffi::PyModuleDef_HEAD_INIT,
m_name: std::ptr::null(),
Expand Down

0 comments on commit 162a65e

Please sign in to comment.