fosskers / nonempty-collections

Correct-by-construction non-empty collections.
https://crates.io/crates/nonempty-collections
MIT License
15 stars 6 forks source link

Implement `Result<T,E>` collection for non-empty iterator #3

Closed gshuflin closed 1 year ago

gshuflin commented 1 year ago

This PR implements FromNonEmptyIterator for Result<T,E>, so that non-empty iterators of Result types can use the .collect::<Result<NEVec<_>, Error>>() idiom to create a single Result containing a nonempty collection in its Ok branch.

fosskers commented 1 year ago

Ah I saw your other PR first and was confused. Alright I'll look over this one first!

gshuflin commented 1 year ago

Ah I saw your other PR first and was confused. Alright I'll look over this one first!

Thanks for taking a look! It looks like the CI pipeline is failing with a spurious network error at the moment.

fosskers commented 1 year ago

There are some funky issues with serde at the moment. Let's run it again.

fosskers commented 1 year ago

I just published 0.1.2. Thanks for this!