distinguish overflow and unimplemented in Step::steps_between
This commit is contained in:
parent
b5117538e9
commit
de741d2093
6 changed files with 94 additions and 79 deletions
|
@ -624,7 +624,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