Skip to content

Commit 60f7c29

Browse files
committed
Fix build on latest nightlies
1 parent 2a89253 commit 60f7c29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/exts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn allocate_buffer(layout: Layout) -> Box<[u8]> {
1717
}
1818
unsafe {
1919
match Global.alloc(layout) {
20-
Ok(mem) => Box::from_raw(slice::from_raw_parts_mut(mem.as_ptr(), layout.size())),
20+
Ok((mem, len)) => Box::from_raw(slice::from_raw_parts_mut(mem.as_ptr(), len)),
2121
Err(_) => handle_alloc_error(layout),
2222
}
2323
}

0 commit comments

Comments
 (0)