Skip to content

Commit 1740808

Browse files
committed
---
yaml --- r: 7789 b: refs/heads/snap-stage3 c: 64ce563 h: refs/heads/master i: 7787: 4b00598 v: v3
1 parent 2223646 commit 1740808

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
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c7b23f9a86fcdf328ebb349d9a5ad4e4c7dfe6ce
4+
refs/heads/snap-stage3: 64ce563c054573bd12425e3253b54c1ee91ec84f
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/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/snap-stage3/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)