Skip to content

Commit 20c27a6

Browse files
committed
fix tests
1 parent d9ad1c8 commit 20c27a6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ unsafe impl<const ORDER: usize> GlobalAlloc for LockedHeap<ORDER> {
274274
/// Create a locked heap:
275275
/// ```
276276
/// use buddy_system_allocator::*;
277-
/// let heap = LockedHeapWithRescue::new(|heap: &mut Heap<32>| {});
277+
/// let heap = LockedHeapWithRescue::new(|heap: &mut Heap<32>, layout: &core::alloc::Layout| {});
278278
/// ```
279279
///
280280
/// Before oom, the allocator will try to call rescue function and try for one more time.

src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn test_heap_oom() {
7777
#[test]
7878
fn test_heap_oom_rescue() {
7979
static mut SPACE: [usize; 100] = [0; 100];
80-
let heap = LockedHeapWithRescue::new(|heap: &mut Heap<32>| unsafe {
80+
let heap = LockedHeapWithRescue::new(|heap: &mut Heap<32>, _layout: &Layout| unsafe {
8181
heap.add_to_heap(SPACE.as_ptr() as usize, SPACE.as_ptr().add(100) as usize);
8282
});
8383

0 commit comments

Comments
 (0)