You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case is this: given an incoming data stream, I want to provide a stream to the user consisting of the accumulated data stream, so ["lorem", "ipsum", "dolor"] would become ["lorem", "lorem ipsum", "lorem ipsum dolor"].
The currently implementation of StreamExt::scan makes this less ergonomic than is ideal, because I need to wrap everything in Some().
In addition, if I want the stream's entries to be Result<Foo>, and I want to unwrap the Err variant in one scan iteration, I can't use ? shorthand.
This feels a bit like scan should actually be named filter_scan, much like how map and filter_map are the non-Option and Option versions of each other.
The text was updated successfully, but these errors were encountered:
My use case is this: given an incoming data stream, I want to provide a stream to the user consisting of the accumulated data stream, so
["lorem", "ipsum", "dolor"]
would become["lorem", "lorem ipsum", "lorem ipsum dolor"]
.The currently implementation of
StreamExt::scan
makes this less ergonomic than is ideal, because I need to wrap everything inSome()
.In addition, if I want the stream's entries to be
Result<Foo>
, and I want to unwrap theErr
variant in onescan
iteration, I can't use?
shorthand.This feels a bit like
scan
should actually be namedfilter_scan
, much like howmap
andfilter_map
are the non-Option and Option versions of each other.The text was updated successfully, but these errors were encountered: