The documentation for is_done() says, "Checks if get() will return None". However, is_done() can be implemented to return true even when get() returns Some. Is the documentation overly specific or is it undefined behavior to implement is_done() such that it can return true when get() returns Some?
P.S. this is relevant to me because I have a use-case where I need to get the final value from a streaming iterator. With the current streaming-iterator API, this requires get() to return Some when is_done() returns true.
The documentation for
is_done()says, "Checks ifget()will returnNone". However,is_done()can be implemented to returntrueeven whenget()returnsSome. Is the documentation overly specific or is it undefined behavior to implementis_done()such that it can returntruewhenget()returnsSome?P.S. this is relevant to me because I have a use-case where I need to get the final value from a streaming iterator. With the current
streaming-iteratorAPI, this requiresget()to returnSomewhenis_done()returnstrue.