Skip to content

Commit 1c1380c

Browse files
committed
---
yaml --- r: 505 b: refs/heads/master c: 6bce296 h: refs/heads/master i: 503: 7aaf295 v: v3
1 parent fbb511d commit 1c1380c

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 445d3fe39cbe6b56b72fd08065e3569d73aeb10b
2+
refs/heads/master: 6bce296d9fe42a54276198e06389aa8cd85a4262

trunk/src/lib/_vec.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,11 @@ fn print_debug_info[T](vec[T] v) {
6565

6666
// Returns elements from [start..end) from v.
6767
fn slice[T](vec[T] v, int start, int end) -> vec[T] {
68-
check(0 <= start);
69-
check(start <= end);
70-
// FIXME #108: This doesn't work yet.
71-
//check(end <= int(len[T](v)));
68+
check (0 <= start);
69+
check (start <= end);
70+
check (end <= (len[T](v) as int));
7271
auto result = alloc[T]((end - start) as uint);
73-
let mutable int i = start;
72+
let int i = start;
7473
while (i < end) {
7574
result += vec(v.(i));
7675
i += 1;

0 commit comments

Comments
 (0)