Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/libcore/iter/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ pub trait Step: Clone + PartialOrd + Sized {
/// without overflow.
fn steps_between(start: &Self, end: &Self) -> Option<usize>;

/// Replaces this step with `1`, returning itself.
/// Replaces this step with `1`, returning a clone of itself.
///
/// The output of this method should always be greater than the output of replace_zero.
fn replace_one(&mut self) -> Self;

/// Replaces this step with `0`, returning itself.
/// Replaces this step with `0`, returning a clone of itself.
///
/// The output of this method should always be less than the output of replace_one.
fn replace_zero(&mut self) -> Self;

/// Adds one to this step, returning the result.
Expand Down