Auto merge of #130867 - michirakara:steps_between, r=dtolnay
distinguish overflow and unimplemented in Step::steps_between
This commit is contained in:
commit
f1e0752404
6 changed files with 94 additions and 79 deletions
|
@ -638,7 +638,7 @@ impl AddAssign for Size {
|
|||
#[cfg(feature = "nightly")]
|
||||
impl Step for Size {
|
||||
#[inline]
|
||||
fn steps_between(start: &Self, end: &Self) -> Option<usize> {
|
||||
fn steps_between(start: &Self, end: &Self) -> (usize, Option<usize>) {
|
||||
u64::steps_between(&start.bytes(), &end.bytes())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue