Skip to content

Commit

Permalink
Adjust readme and doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
slightlyoutofphase committed Apr 1, 2021
1 parent 0057be5 commit bd745d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

Provides truly zero-cost alternatives to `Iterator::step_by` for both incrementing and decrementing any type that satisfies `RangeBounds<T: Copy + Default + Step>`.

The code generated for the two trait methods this crate implements, `inc_by` and `dec_by`, should in the overwhelming majority of cases be nearly or completely identical
to the code that would be generated for an incrementing "step"-based `while` loop or decrementing "step"-based `while` loop, respectively. If you come across a scenario where
The assembly code generated for the two trait methods this crate implements, `inc_by` and `dec_by`, should in the overwhelming majority of cases be nearly or completely identical
to the assembly code that would be generated for an incrementing "step"-based `while` loop or decrementing "step"-based `while` loop, respectively. If you come across a scenario where
it is not, please feel free to open an issue about it.

**Minimum supported Rust version:** this is a nightly-only crate at the moment due to the use of
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl<T: Copy + Default + Step, const STEP: usize> Iterator for DecBy<T, STEP> {
}
}

/// A supertrait of [`RangeBounds<T>`](core::ops::RangeBounds) where `T` is `Copy + Default + Step`
/// A subtrait of [`RangeBounds<T>`](core::ops::RangeBounds) where `T` is `Copy + Default + Step`
/// that turns implementers of it into an instance of [`IncBy`][crate::IncBy] when
/// [`inc_by`](crate::IntoIncBy::inc_by) is called.
pub trait IntoIncBy<T: Copy + Default + Step>: RangeBounds<T> {
Expand All @@ -117,7 +117,7 @@ pub trait IntoIncBy<T: Copy + Default + Step>: RangeBounds<T> {
fn inc_by<const STEP: usize>(self) -> IncBy<T, STEP>;
}

/// A supertrait of [`RangeBounds<T>`](core::ops::RangeBounds) where `T` is `Copy + Default + Step`
/// A subtrait of [`RangeBounds<T>`](core::ops::RangeBounds) where `T` is `Copy + Default + Step`
/// that turns implementers of it into an instance of [`DecBy`][crate::DecBy] when
/// [`dec_by`](crate::IntoDecBy::dec_by) is called.
pub trait IntoDecBy<T: Copy + Default + Step>: RangeBounds<T> {
Expand Down

0 comments on commit bd745d0

Please sign in to comment.