We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0643fcd commit f6b6267Copy full SHA for f6b6267
src/core/slab.rs
@@ -10,7 +10,7 @@ use nginx_sys::{
10
ngx_slab_pool_t,
11
};
12
13
-use crate::allocator::{dangling_aligned, AllocError, Allocator};
+use crate::allocator::{dangling_for_layout, AllocError, Allocator};
14
15
/// Non-owning wrapper for an [`ngx_slab_pool_t`] pointer, providing methods for working with
16
/// shared memory slab pools.
@@ -112,7 +112,7 @@ unsafe impl Allocator for LockedSlabPool {
112
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
113
if layout.size() == 0 {
114
return Ok(NonNull::slice_from_raw_parts(
115
- dangling_aligned(layout.align()),
+ dangling_for_layout(&layout),
116
layout.size(),
117
));
118
}
0 commit comments