# add-one
[](https://crates.io/crates/add-one)

[](https://travis-ci.org/02sh/add-one)
> Returns n + 1.
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
add-one = "0.2"
```
and this to your crate root:
```rust
extern crate add_one;
```
## Example
```rust
extern crate add_one;
use add_one::add_one;
pub fn add_n(x: &mut usize, n: usize) {
for _ in 0..usize {
*x = add_one(x);
}
}
```
or
```sh
$ cargo run 12
$ 13
```
## Compatibility
The `add-one` crate is tested for rustc 1.26 and greater.