Skip to content

Commit f6b6267

Browse files
committed
fixup! feat: wrapper for ngx_slab_pool_t
1 parent 0643fcd commit f6b6267

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/slab.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use nginx_sys::{
1010
ngx_slab_pool_t,
1111
};
1212

13-
use crate::allocator::{dangling_aligned, AllocError, Allocator};
13+
use crate::allocator::{dangling_for_layout, AllocError, Allocator};
1414

1515
/// Non-owning wrapper for an [`ngx_slab_pool_t`] pointer, providing methods for working with
1616
/// shared memory slab pools.
@@ -112,7 +112,7 @@ unsafe impl Allocator for LockedSlabPool {
112112
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
113113
if layout.size() == 0 {
114114
return Ok(NonNull::slice_from_raw_parts(
115-
dangling_aligned(layout.align()),
115+
dangling_for_layout(&layout),
116116
layout.size(),
117117
));
118118
}

0 commit comments

Comments
 (0)