Closed DBLouis closed 2 years ago
Hi @DBLouis, thank you for opening this issue!
So you're saying that this code should be removed, in favor of just returning the error? That sounds sensible to me, and I'd be happy to merge a pull request that does that.
Thank you
Addressed by #190.
Returning an empty iterator when
EGAIN/EWOULDBLOCK
is returned byread
is not ideal in async context, for example in combination with tokioAsyncFd
, because you need to detect "wouldblocks" but for that you have to consume the iterator. The iterator in neitherClone
norExactSizeIterator
which would help. I think that not handling this special case and letting the caller decide what to do with it is better.