| Crates.io | iter_tools |
| lib.rs | iter_tools |
| version | 0.39.0 |
| created_at | 2022-01-11 21:47:23.103289+00 |
| updated_at | 2025-09-23 09:54:11.478109+00 |
| description | Collection of general purpose tools to iterate. Currently it simply reexports itertools. |
| homepage | https://github.com/Wandalen/wTools/tree/master/module/core/iter_tools |
| repository | https://github.com/Wandalen/wTools/tree/master/module/core/iter_tools |
| max_upload_size | |
| id | 512478 |
| size | 35,052 |
iter_toolsCollection of general purpose tools to iterate. Currently it simply reexports itertools.
# #[ cfg( feature = "itertools" ) ]
# {
use iter_tools::*;
/* standard functions */
let vec = vec![ 5, 1, -2 ];
let min = min( &vec );
assert_eq!( *min.unwrap(), -2 );
/* non standard functions */
let vec = vec![ 5, 1, -2 ];
let added = vec![ "a", "b", "c" ];
let mut result = vec![];
let zipped = zip( &vec, &added );
for ( left, right ) in zipped
{
result.push( ( *left, *right ) );
}
assert_eq!( result, vec![ ( 5, "a" ), ( 1, "b" ), ( -2, "c" ) ] );
# }
cargo add iter_tools
git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/iter_tools_trivial
cargo run
git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/iter_tools_trivial
cargo run