src: fix tests

This commit is contained in:
Felix Krull 2020-10-18 17:00:28 +02:00 committed by Colin Walters
parent e18919e0ef
commit 2caf0264c7

View File

@ -48,7 +48,7 @@ mod tests {
use super::*;
use std::{ffi::CStr, ptr::null_mut};
unsafe fn ptr_array_as_slice<'a, T>(ptr: *mut *mut T) -> &'a [*mut T] {
unsafe fn ptr_array_to_slice<'a, T>(ptr: *mut *mut T) -> &'a [*mut T] {
let mut len = 0;
while !(*ptr.offset(len)).is_null() {
len += 1;