Does anyone have an example of going from an Iterator of type Result<T, SomeError> to Iterator of type T, while handling all errors? I can see how this could be done with `for x in y` syntax, but I'm wondering if this can be done using combinators. Can it?
Oh, so I want to *handle* errors, not make them go away. E.g. return on the first error case, or continue going on. I guess the assumption here is that the source is not guaranteed to be finite, so returning on the first error seems like the most sane approach.
-
-
Oh, you said "all" errors, so I assumed you weren't looking for https://doc.rust-lang.org/std/result/enum.Result.html#impl-FromIterator%3CResult%3CA%2C%20E%3E%3E … but now I think you are.

-
Oh oops, my bad! -- should've been more clear, haha. This looks very cool! -- do you maybe have an example of how I'd use it?
@Argorak mentioned made an example of using `collect`. Is this the same? - 4 more replies
New conversation -
-
-
theres also `try_for_each`, which does roughly that, though you'd have to do something to map it to a non-failable iterator.
-
I'm not sure, but perhaps I'm looking for a (currently non-existent) try_map combinator?
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.