Move vector addition out of trans and into libcore.
This commit is contained in:
parent
f8fa0a2437
commit
0e5cfd9f33
19 changed files with 172 additions and 247 deletions
|
@ -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 = "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue