Skip to content

Commit a774009

Browse files
committed
---
yaml --- r: 13784 b: refs/heads/try c: fec36de h: refs/heads/master v: v3
1 parent 2e45ab6 commit a774009

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: a185b106471b4bc894393aecb31a23b71c8a4886
5+
refs/heads/try: fec36de94e02e9c7c6fec05a2aea32bfbdc2f0f8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/libcore/str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,16 @@ Function: from_cstr
217217
Create a Rust string from a null-terminated C string
218218
*/
219219
unsafe fn from_cstr(cstr: sbuf) -> str {
220-
let res = "";
220+
let res = [];
221221
let start = cstr;
222222
let curr = start;
223223
let i = 0u;
224224
while *curr != 0u8 {
225-
push_byte(res, *curr);
225+
vec::push(res, *curr);
226226
i += 1u;
227227
curr = ptr::offset(start, i);
228228
}
229-
ret res;
229+
ret from_bytes(res);
230230
}
231231

232232
/*

0 commit comments

Comments
 (0)