1
Fork 0

libcore: Remove vec::to_ptr in favor of vec::unsafe::to_ptr. Closes #1829.

This commit is contained in:
Patrick Walton 2012-02-28 20:43:39 -08:00
parent d3331bce98
commit 362f23641a
7 changed files with 29 additions and 35 deletions

View file

@ -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");
}