File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,7 @@ impl<const N: usize> PyModuleSlotsBuilder<N> {
193193 #[ allow( clippy:: new_without_default) ]
194194 pub const fn new ( ) -> Self {
195195 Self {
196- // Because the array is c-style, the empty elements should be zeroed.
197- // `std::mem::zeroed()` requires msrv 1.75 for const
198- values : [ ZEROED_SLOT ; N ] ,
196+ values : [ unsafe { std:: mem:: zeroed ( ) } ; N ] ,
199197 len : 0 ,
200198 }
201199 }
@@ -258,11 +256,6 @@ pub struct PyModuleSlots<const N: usize>(UnsafeCell<[ffi::PyModuleDef_Slot; N]>)
258256// which only uses them to build the `ffi::ModuleDef`.
259257unsafe impl < const N : usize > Sync for PyModuleSlots < N > { }
260258
261- const ZEROED_SLOT : ffi:: PyModuleDef_Slot = ffi:: PyModuleDef_Slot {
262- slot : 0 ,
263- value : std:: ptr:: null_mut ( ) ,
264- } ;
265-
266259/// Trait to add an element (class, function...) to a module.
267260///
268261/// Currently only implemented for classes.
You can’t perform that action at this time.
0 commit comments