try_zip

Crates.iotry_zip
lib.rstry_zip
version0.2.1
sourcesrc
created_at2024-04-19 14:52:41.905121
updated_at2024-05-18 11:47:59.982038
descriptionZip with a shorter or optional second iterator.
homepage
repository
max_upload_size
id1213786
size4,163
(SED4906)

documentation

README

try_zip

A variant of zip that can handle a shorter/optional second iterator.

Given (0..10).zip(0..5), zip would stop after the shorter iterator 0..5 ends.

(0..10).try_zip(Some(0..5)), however, will continue, using None for the second value of the tuple. (The tuple returned by TryZip is of the type (A::Item, Option<B::Item>))

This crate was written for easily parsing IRC join messages.

Commit count: 0

cargo fmt