Elektrine lite

← Feed

@danderson@hachyderm.io

Post #3951950

2026-07-20 04:39 UTC

To be clear the bemusing part is that `collect()` works by invoking `Vec::from_iterator(iter)`, and _that_ iterator is an iterator of just the values, not value-or-error. There is some kind of cursed magic taking place that transforms an iterator of Result into an iterator of V, which lets Vec construct itself streamily by iteration, but also short-circuits the entire computation and returns an error if it encounters one. I think? I'm so confused.

Replies (1)