-
Notifications
You must be signed in to change notification settings - Fork 627
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
Release 0.3.29 #2791
Merged
Release 0.3.29 #2791
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` error package `log v0.4.19` cannot be built because it requires rustc 1.60.0 or newer, while the currently active rustc version is 1.56.1 ```
``` error[E0635]: unknown feature `proc_macro_span_shrink` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.52/src/lib.rs:92:30 | 92 | feature(proc_macro_span, proc_macro_span_shrink) | ^^^^^^^^^^^^^^^^^^^^^^ ```
- add `len`, `is_empty` methods to inspect how many messages are enqueued in the message queue. - add test for `len` and `is_empty` Co-authored-by: Jakub Horak <[email protected]>
and `push_back` instead of `push` (which is deprecated).
…rcuit These futures should panic if they are polled after completing. Currently they do so but only if they complete due to exhausting the `Stream` that they pull data from. If they complete due to short-circuiting, they are left in a state where `fut` and `accum` are still `Some`. This means that if they are polled again, they end up polling the inner `fut` again. That usually causes a panic but the error message will likely reference the internal `Future`, not `All` / `Any`. With this commit, `All` and `Any`'s internal state will be set such that if they are polled again after completing, they will panic without polling `fut`.
It looks like `All` was originally implemented by copying from `TryFold` from which it inherited its `accum` field. However, `accum` can only ever be one of two values: `None` (if `All` has already completed) or `Some(true)` (if it's still processing values from the inner `Stream`). It doesn't need to keep track of an accumulator because the very fact that it hasn't short-circuited yet means that the accumulated value can't be `Some(false)`. Therefore, we only need two values here and we can represent them with a `bool` indicating whether or not `All` has already completed. The same principle applies for `Any` but substituting `Some(false)` for `Some(true)`.
``` error: unused import: `self::stream_select_mod::*` --> futures-util/src/async_await/mod.rs:38:9 | 38 | pub use self::stream_select_mod::*; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]` ```
…omic CAS is not available
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
TryStreamExt::try_ready_chunks
(AddTryStreamExt::try_ready_chunks
as failable version ofStreamExt::ready_chunks
#2757)TryStreamExt::{try_all,try_any}
(AddTryAll
andTryAny
adapters #2783)UnboundedSender::{len,is_empty}
(Addlen
method forUnboundedSender
#2750)Sync
impl ofFuturesUnordered
(Fix Sync impl of FuturesUnordered #2788)Backports:
TryStreamExt::try_ready_chunks
as failable version ofStreamExt::ready_chunks
#2757len
method forUnboundedSender
#2750FuturesOrdered
docs #2778All
andAny
adapters #2782TryAll
andTryAny
adapters #2783