File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
branches/snap-stage3/src/libcore Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: a185b106471b4bc894393aecb31a23b71c8a4886
4
+ refs/heads/snap-stage3: fec36de94e02e9c7c6fec05a2aea32bfbdc2f0f8
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -217,16 +217,16 @@ Function: from_cstr
217
217
Create a Rust string from a null-terminated C string
218
218
*/
219
219
unsafe fn from_cstr ( cstr : sbuf ) -> str {
220
- let res = "" ;
220
+ let res = [ ] ;
221
221
let start = cstr;
222
222
let curr = start;
223
223
let i = 0 u;
224
224
while * curr != 0u8 {
225
- push_byte ( res, * curr) ;
225
+ vec :: push ( res, * curr) ;
226
226
i += 1 u;
227
227
curr = ptr:: offset ( start, i) ;
228
228
}
229
- ret res;
229
+ ret from_bytes ( res) ;
230
230
}
231
231
232
232
/*
You can’t perform that action at this time.
0 commit comments