| Crates.io | itermaps |
| lib.rs | itermaps |
| version | 0.3.8 |
| created_at | 2024-06-24 19:15:19.267301+00 |
| updated_at | 2025-05-20 23:35:38.592831+00 |
| description | Implement commonly used combinations of `Iterator::map` |
| homepage | https://github.com/A4-Tacks/itermaps-rs |
| repository | https://github.com/A4-Tacks/itermaps-rs |
| max_upload_size | |
| id | 1282459 |
| size | 47,198 |
Implement commonly used combinations of Iterator::map
# use itermaps::MapExt;
let arr = [[1, 2], [3, 4]];
let first: Vec<i32> = arr.iter().map_index(0).copied().collect();
assert_eq!(first, [1, 3]);
let arr = ["foo", "bar"];
let arr1: Vec<String> = arr.into_iter().map_to_owned().collect();
assert_eq!(arr1, arr);
# use itermaps::FilterExt;
let mut iter = [1, 2, 3].iter().filter_ne(&&2);
assert_eq!(iter.next(), Some(&1));
assert_eq!(iter.next(), Some(&3));
assert_eq!(iter.next(), None);