File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: a185b106471b4bc894393aecb31a23b71c8a4886
5
+ refs/heads/try: fec36de94e02e9c7c6fec05a2aea32bfbdc2f0f8
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