1
Fork 0

Move vector addition out of trans and into libcore.

This commit is contained in:
Eric Holk 2012-06-13 16:14:01 -07:00
parent f8fa0a2437
commit 0e5cfd9f33
19 changed files with 172 additions and 247 deletions

View file

@ -1743,8 +1743,9 @@ mod unsafe {
Does not verify that the vector contains valid UTF-8.
"]
unsafe fn from_bytes(v: [const u8]) -> str unsafe {
let vcopy = v + [0u8];
ret ::unsafe::transmute(vcopy);
let mut vcopy : [u8] = ::unsafe::transmute(copy v);
vec::push(vcopy, 0u8);
::unsafe::transmute(vcopy)
}
#[doc = "