Skip to content

Commit 575e160

Browse files
committed
---
yaml --- r: 13775 b: refs/heads/try c: 64ce563 h: refs/heads/master i: 13773: a8ba056 13771: fca82de 13767: 8858d7a 13759: 4d20d7e v: v3
1 parent 9472016 commit 575e160

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
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: c7b23f9a86fcdf328ebb349d9a5ad4e4c7dfe6ce
5+
refs/heads/try: 64ce563c054573bd12425e3253b54c1ee91ec84f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/compiletest/procsrv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fn readclose(fd: fd_t) -> str {
8585
let buf = "";
8686
while !reader.eof() {
8787
let bytes = reader.read_bytes(4096u);
88-
buf += str::unsafe_from_bytes(bytes);
88+
buf += str::from_bytes(bytes);
8989
}
9090
os::fclose(file);
9191
ret buf;
@@ -114,8 +114,8 @@ fn worker(p: port<request>) {
114114
// the alt discriminant are wrong.
115115
alt recv(p) {
116116
exec(lib_path, prog, args, respchan) {
117-
{lib_path: str::unsafe_from_bytes(lib_path),
118-
prog: str::unsafe_from_bytes(prog),
117+
{lib_path: str::from_bytes(lib_path),
118+
prog: str::from_bytes(prog),
119119
args: clone_vecu8str(args),
120120
respchan: respchan}
121121
}
@@ -189,7 +189,7 @@ fn clone_vecstr(v: [str]) -> [[u8]] {
189189
fn clone_vecu8str(v: [[u8]]) -> [str] {
190190
let r = [];
191191
for t in vec::slice(v, 0u, vec::len(v)) {
192-
r += [str::unsafe_from_bytes(t)];
192+
r += [str::from_bytes(t)];
193193
}
194194
ret r;
195195
}

branches/try/src/libcore/extfmt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ mod rt {
390390
fn str_init_elt(n_elts: uint, c: char) -> str {
391391
let svec = vec::init_elt::<u8>(n_elts, c as u8);
392392

393-
ret str::unsafe_from_bytes(svec);
393+
ret str::from_bytes(svec);
394394
}
395395
enum pad_mode { pad_signed, pad_unsigned, pad_nozero, }
396396
fn pad(cv: conv, s: str, mode: pad_mode) -> str {
@@ -439,7 +439,7 @@ mod rt {
439439
if signed && zero_padding && str::byte_len(s) > 0u {
440440
let head = s[0];
441441
if head == '+' as u8 || head == '-' as u8 || head == ' ' as u8 {
442-
let headstr = str::unsafe_from_bytes([head]);
442+
let headstr = str::from_bytes([head]);
443443
// FIXME: not UTF-8 safe
444444
let bytelen = str::byte_len(s);
445445
let numpart = str::substr(s, 1u, bytelen - 1u);

0 commit comments

Comments
 (0)