| 1 |
# Itertools |
| 2 |
|
| 3 |
Extra iterator adaptors, functions and macros. |
| 4 |
|
| 5 |
Please read the [API documentation here](https://docs.rs/itertools/). |
| 6 |
|
| 7 |
[](https://github.com/rust-itertools/itertools/actions) |
| 8 |
[](https://crates.io/crates/itertools) |
| 9 |
|
| 10 |
How to use with Cargo: |
| 11 |
|
| 12 |
```toml |
| 13 |
[dependencies] |
| 14 |
itertools = "0.10.5" |
| 15 |
``` |
| 16 |
|
| 17 |
How to use in your crate: |
| 18 |
|
| 19 |
```rust |
| 20 |
use itertools::Itertools; |
| 21 |
``` |
| 22 |
|
| 23 |
## How to contribute |
| 24 |
|
| 25 |
- Fix a bug or implement a new thing |
| 26 |
- Include tests for your new feature, preferably a QuickCheck test |
| 27 |
- Make a Pull Request |
| 28 |
|
| 29 |
For new features, please first consider filing a PR to [rust-lang/rust](https://github.com/rust-lang/rust), |
| 30 |
adding your new feature to the `Iterator` trait of the standard library, if you believe it is reasonable. |
| 31 |
If it isn't accepted there, proposing it for inclusion in ``itertools`` is a good idea. |
| 32 |
The reason for doing is this is so that we avoid future breakage as with ``.flatten()``. |
| 33 |
However, if your feature involves heap allocation, such as storing elements in a ``Vec<T>``, |
| 34 |
then it can't be accepted into ``libcore``, and you should propose it for ``itertools`` directly instead. |
| 35 |
|
| 36 |
## License |
| 37 |
|
| 38 |
Dual-licensed to be compatible with the Rust project. |
| 39 |
|
| 40 |
Licensed under the Apache License, Version 2.0 |
| 41 |
https://www.apache.org/licenses/LICENSE-2.0 or the MIT license |
| 42 |
https://opensource.org/licenses/MIT, at your |
| 43 |
option. This file may not be copied, modified, or distributed |
| 44 |
except according to those terms. |