Provides inc_by()
and dec_by()
(which are similar to step_by()
but actually designed to optimize well for numeric ranges) for all instances of RangeBounds<T: Copy + Default + Step>
.
This readme will likely be expanded upon in the future, but for now just run cargo bench
on the repository to get an idea of why you might be inclined to use this crate.
Minimum supported Rust version: this is a nightly-only crate at the moment due to the use of
the Step
trait, which has not yet been stabilized.
#![no_std]
compatibility: this crate is fully #![no_std]
compatible by default.
A basic usage example:
use *;
// Apart from aiming to provide a properly-optimized Rust equivalent to the sort of C-style for-loop
// that ends in `i += number` or `i -= number` as opposed to `i++` or `i--`, this crate also aims to
// (and does) support backwards ranges in a meaningful way that's logically equivalent to how
// forwards ranges are generally dealt with in Rust.
License:
Licensed under either the MIT license or version 2.0 of the Apache License. Your choice as to which! Any source code contributions will be dual-licensed in the same fashion.