You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DeprecatedStepBy being the old unstable core::iter::range::StepBy. cc #27741
Its size_hint over-optimistically adds 1 to Step::steps_between. That works if the step exactly lands on the end condition, a perfect multiple, but otherwise:
let i = (0...9).step_by(2);let v:Vec<_> = i.clone().collect();assert_eq!(v.len(),5);// OKassert_eq!(i.size_hint(),(5,Some(5)));// FAILED, gives `(6, Some(6))`
DeprecatedStepBy
being the old unstablecore::iter::range::StepBy
. cc #27741Its
size_hint
over-optimistically adds 1 toStep::steps_between
. That works if the step exactly lands on the end condition, a perfect multiple, but otherwise:Or if the iterator is already exhausted:
At least it doesn't implement
TrustedLen
.The text was updated successfully, but these errors were encountered: