-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SinkExt::feed #2155
SinkExt::feed #2155
Conversation
3f30fbd
to
d82d0e8
Compare
@mzabaluev I've come here hoping for the same thing, but it looks like the CI build failed due to clippy warnings. Maybe that's why no one reviewed this yet? If so, it looks like the clippy issues are probably not related to this PR, so hopefully just rebasing on latest master would fix the CI? :) |
@Ekleog I have rebased and pushed the branch after some cleanup, but the CI situation is the same. |
Hmm that's weird, there's nothing in the diff that looks like it could be causing the raised issue… let's hope that someone with more knowledge of this repo comes and has a look, then, I guess :) |
CI failure is due to (new) clippy bug: rust-lang/rust-clippy#5704 EDIT: will be fIxed in #2178 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay reviewing.
I think it makes sense to add feed
method, but I'm not sure why feed_all
method is needed. Could you explain the use case of feed_all
? (IIUC, most of its use cases can be resolved with feed
+ loop or send_all
, right?)
|
Sorry for the delayed reply.
These do not seem to benefit more than the confusion of providing similar methods with subtle differences. (Also, what this patch is trying to add is subtly different from Could you remove the changes related to |
Like send, except no flushing is done at the end. This allows sequentially feeding the sink with items in async code without intermittent flushing. Reuse code of Feed internally in the Send future.
8134d1b
to
3d77e1b
Compare
I have pushed a rebased branch with just the changes for
Is the plan to change the specification of
This is actually part of why it makes sense to add as a method, just like I will submit the |
I don't have any specific plans at this time, but I'm starting to think (In any case, there are some issues in the current |
Thanks! |
Like send, except no flushing is done at the end. This allows sequentially feeding the sink with items in async code without intermittent flushing. Reuse code of Feed internally in the Send future.
Add
SinkExt
methodsfeed
and. These are likefeed_all
send
andsend_all
, except that the sink is not flushed at the end, allowing a sequence of output operations to be performed in async code without intermittent flushing. As a downside, the user is responsible for flushing or closing the sink to ensure completion.Resolves #2059