blob: 0db0037b2032737e04cf10dfbc88dbff6ab99cf8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#![crate_name="cci_impl_lib"]
pub trait uint_helpers {
fn to<F>(&self, v: usize, f: F) where F: FnMut(usize);
}
impl uint_helpers for usize {
#[inline]
fn to<F>(&self, v: usize, mut f: F) where F: FnMut(usize) {
let mut i = *self;
while i < v {
f(i);
i += 1;
}
}
}
|