-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
Code looks like this:
fn consume<T>(+v: ~[T], f: fn(uint, +v: T)) unsafe {
do as_imm_buf(v) |p, ln| {
for uint::range(0, ln) |i| {
let x <- *ptr::offset(p, i);
f(i, move x);
}
}
raw::set_len(v, 0);
}
What happens if the callback fails in the middle of the loop?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.