We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9cf541 commit 983cae7Copy full SHA for 983cae7
src/libcore/iter/range.rs
@@ -20,10 +20,14 @@ pub trait Step: Clone + PartialOrd + Sized {
20
/// without overflow.
21
fn steps_between(start: &Self, end: &Self) -> Option<usize>;
22
23
- /// Replaces this step with `1`, returning itself.
+ /// Replaces this step with `1`, returning a clone of itself.
24
+ ///
25
+ /// The output of this method should always be greater than the output of replace_zero.
26
fn replace_one(&mut self) -> Self;
27
- /// Replaces this step with `0`, returning itself.
28
+ /// Replaces this step with `0`, returning a clone of itself.
29
30
+ /// The output of this method should always be less than the output of replace_one.
31
fn replace_zero(&mut self) -> Self;
32
33
/// Adds one to this step, returning the result.
0 commit comments