libcore: Remove vec::to_ptr in favor of vec::unsafe::to_ptr. Closes #1829.
This commit is contained in:
parent
d3331bce98
commit
362f23641a
7 changed files with 29 additions and 35 deletions
|
@ -2017,7 +2017,7 @@ mod tests {
|
|||
#[test]
|
||||
fn test_from_cstr() unsafe {
|
||||
let a = [65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 0u8];
|
||||
let b = vec::to_ptr(a);
|
||||
let b = vec::unsafe::to_ptr(a);
|
||||
let c = from_cstr(b);
|
||||
assert (c == "AAAAAAA");
|
||||
}
|
||||
|
@ -2025,7 +2025,7 @@ mod tests {
|
|||
#[test]
|
||||
fn test_from_cstr_len() unsafe {
|
||||
let a = [65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 0u8];
|
||||
let b = vec::to_ptr(a);
|
||||
let b = vec::unsafe::to_ptr(a);
|
||||
let c = from_cstr_len(b, 3u);
|
||||
assert (c == "AAA");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue