Skip to content

Commit

Permalink
Address FIXME in _vec waiting on closed issue rust-lang#108.
Browse files Browse the repository at this point in the history
  • Loading branch information
froystig committed Aug 12, 2010
1 parent 445d3fe commit 6bce296
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib/_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,11 @@ fn print_debug_info[T](vec[T] v) {

// Returns elements from [start..end) from v.
fn slice[T](vec[T] v, int start, int end) -> vec[T] {
check(0 <= start);
check(start <= end);
// FIXME #108: This doesn't work yet.
//check(end <= int(len[T](v)));
check (0 <= start);
check (start <= end);
check (end <= (len[T](v) as int));
auto result = alloc[T]((end - start) as uint);
let mutable int i = start;
let int i = start;
while (i < end) {
result += vec(v.(i));
i += 1;
Expand Down

0 comments on commit 6bce296

Please sign in to comment.