Skip to content

Commit d528ab1

Browse files
killerswanbrson
authored andcommitted
---
yaml --- r: 7987 b: refs/heads/snap-stage3 c: 47c57a1 h: refs/heads/master i: 7985: 846b29b 7983: 7780a1d v: v3
1 parent ab5d2f3 commit d528ab1

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
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: 4e406d7fdd55c6c499eb3af750c64292a88e4d9f
4+
refs/heads/snap-stage3: 47c57a17dc51ff32594b5759c300b84e380b9f7b
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/cargo/cargo.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ fn install_named_specific(c: cargo, wd: str, src: str, name: str) {
573573
error("Can't find package " + src + "/" + name);
574574
}
575575

576-
fn cmd_install(c: cargo, argv: [str]) {
576+
fn cmd_install(c: cargo, argv: [str]) unsafe {
577577
// cargo install <pkg>
578578
if vec::len(argv) < 3u {
579579
cmd_usage();
@@ -596,8 +596,9 @@ fn cmd_install(c: cargo, argv: [str]) {
596596
let uuid = rest(target, 5u);
597597
let idx = str::index(uuid, '/' as u8);
598598
if idx != -1 {
599-
let source = str::slice(uuid, 0u, idx as uint);
600-
uuid = str::slice(uuid, idx as uint + 1u, str::byte_len(uuid));
599+
let source = str::unsafe::slice(uuid, 0u, idx as uint);
600+
uuid = str::unsafe::slice(uuid, idx as uint + 1u,
601+
str::byte_len(uuid));
601602
install_uuid_specific(c, wd, source, uuid);
602603
} else {
603604
install_uuid(c, wd, uuid);
@@ -606,8 +607,9 @@ fn cmd_install(c: cargo, argv: [str]) {
606607
let name = target;
607608
let idx = str::index(name, '/' as u8);
608609
if idx != -1 {
609-
let source = str::slice(name, 0u, idx as uint);
610-
name = str::slice(name, idx as uint + 1u, str::byte_len(name));
610+
let source = str::unsafe::slice(name, 0u, idx as uint);
611+
name = str::unsafe::slice(name, idx as uint + 1u,
612+
str::byte_len(name));
611613
install_named_specific(c, wd, source, name);
612614
} else {
613615
install_named(c, wd, name);

branches/snap-stage3/src/fuzzer/fuzzer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,10 @@ fn check_variants_T<T: copy>(
283283
}
284284
}
285285

286-
fn last_part(filename: str) -> str {
286+
fn last_part(filename: str) -> str unsafe {
287287
let ix = str::rindex(filename, 47u8 /* '/' */);
288288
assert ix >= 0;
289-
str::slice(filename, ix as uint + 1u, str::byte_len(filename) - 3u)
289+
str::unsafe::slice(filename, ix as uint + 1u, str::byte_len(filename) - 3u)
290290
}
291291

292292
enum happiness { passed, cleanly_rejected(str), known_bug(str), failed(str), }

branches/snap-stage3/src/libstd/json.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,17 +228,17 @@ fn from_str_float(s: str) -> (option<json>, str) {
228228

229229
fn from_str_bool(s: str) -> (option<json>, str) {
230230
if (str::starts_with(s, "true")) {
231-
(some(boolean(true)), str::slice(s, 4u, str::byte_len(s)))
231+
(some(boolean(true)), str::char_slice(s, 4u, str::char_len(s)))
232232
} else if (str::starts_with(s, "false")) {
233-
(some(boolean(false)), str::slice(s, 5u, str::byte_len(s)))
233+
(some(boolean(false)), str::char_slice(s, 5u, str::char_len(s)))
234234
} else {
235235
(none, s)
236236
}
237237
}
238238

239239
fn from_str_null(s: str) -> (option<json>, str) {
240240
if (str::starts_with(s, "null")) {
241-
(some(null), str::slice(s, 4u, str::byte_len(s)))
241+
(some(null), str::char_slice(s, 4u, str::char_len(s)))
242242
} else {
243243
(none, s)
244244
}

0 commit comments

Comments
 (0)