This works because Result can be constructed from the iterator of results. Exact impl is impl<T, E, Collection> FromIterator<Result<T, E>> for Result<Collection, E> where Collection: FromIterator<T>, and its semantic is same as your code.
In my above impl, 'Err' short circuits execution. In your code, the map is lazy, and since the collect is doing some type of black magic, does it also ensure "short circuit" on Err ?
There isn't really any black magic involved. collect iterates, looks at every element, puts it into the collection that the inner FromIterator builds, or stops collecting when encountering an Err.
This also means that if the element 9999/10000 is the first Err, an almost-fully-populated Vec will be dropped. But I don't think that is avoidable