f: F,
/// The current internal state to be passed to the closure next.
+ #[unstable(feature = "core")]
pub state: St,
}
pub struct Unfold<St, F> {
f: F,
/// Internal state that will be passed to the closure on the next iteration
+ #[unstable(feature = "core")]
pub state: St,
}
Some(a) => {
let sz = self.stop.to_i64().map(|b| b.checked_sub(a));
match sz {
- Some(Some(bound)) => bound.to_uint(),
+ Some(Some(bound)) => bound.to_usize(),
_ => None,
}
},
Some(a) => {
let sz = self.stop.to_u64().map(|b| b.checked_sub(a));
match sz {
- Some(Some(bound)) => bound.to_uint(),
+ Some(Some(bound)) => bound.to_usize(),
_ => None
}
},
if self.start >= self.end {
(0, Some(0))
} else {
- let length = (self.end - self.start).to_uint();
+ let length = (self.end - self.start).to_usize();
(length.unwrap_or(0), length)
}
}