Skip to content

Commit 413c5dc

Browse files
One more tweak for DecBy before I publish 0.2.0
1 parent bd745d0 commit 413c5dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl<T: Copy + Default + Step, const STEP: usize> Iterator for DecBy<T, STEP> {
8080
#[inline(always)]
8181
fn next(&mut self) -> Option<T> {
8282
if let Some(remaining) = Step::backward_checked(self.start, STEP) {
83-
if Step::forward(remaining, STEP) >= self.end {
83+
if self.start >= self.end {
8484
let res = Some(self.start);
8585
self.start = remaining;
8686
res

0 commit comments

Comments
 (0)