Skip to content

Commit 3be77d1

Browse files
committed
---
yaml --- r: 10713 b: refs/heads/snap-stage3 c: b837f37 h: refs/heads/master i: 10711: 17729a5 v: v3
1 parent d873fc4 commit 3be77d1

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
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: b19c98ea9a90cfb018c255af1c9d885076ef9b11
4+
refs/heads/snap-stage3: b837f37d404bd74eec95496281814f268dbdcd23
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/libcore/vec.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,14 @@ pure fn slice<T: copy>(v: [const T]/&, start: uint, end: uint) -> [T] {
255255
assert (start <= end);
256256
assert (end <= len(v));
257257
let mut result = [];
258-
259-
// unchecked {
260-
// push_all(result, view(v, start, end));
261-
// }
262-
263-
let mut i = start;
264-
while i < end { result += [v[i]]; i += 1u; }
258+
unchecked {
259+
push_all(result, view(v, start, end));
260+
}
265261
ret result;
266262
}
267263

268264
#[doc = "Return a slice that points into another slice."]
269-
pure fn view<T: copy>(v: [const T]/&a, start: uint, end: uint) -> [T]/&a {
265+
pure fn view<T: copy>(v: [const T]/&, start: uint, end: uint) -> [T]/&a {
270266
assert (start <= end);
271267
assert (end <= len(v));
272268
unpack_slice(v) {|p, _len|

0 commit comments

Comments
 (0)