-
Notifications
You must be signed in to change notification settings - Fork 626
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.26 #2699
Merged
Release 0.3.26 #2699
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
`items` is always empty when `poll_ready` exists, so there's no reason to store it inside `ReadyChunks`. This makes code a bit more efficient, but also makes code easier to understand.
``` error: variables can be used directly in the `format!` string --> examples/functional/src/main.rs:45:5 | 45 | println!("Values={:?}", values); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args = note: `-D clippy::uninlined-format-args` implied by `-D warnings` help: change this to | 45 - println!("Values={:?}", values); 45 + println!("Values={values:?}"); | ```
Makes it easier to write some generic code for wrappers of `Shared` future: no need to properly specify all type parameters.
``` warning: safe function's docs have unnecessary `# Safety` section --> futures-task/src/future_obj.rs:151:5 | 151 | fn into_raw(self) -> *mut (dyn Future<Output = T> + 'a); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_safety_doc = note: `#[warn(clippy::unnecessary_safety_doc)]` on by default warning: safe function's docs have unnecessary `# Safety` section --> futures-util/src/future/future/shared.rs:141:5 | 141 | pub fn strong_count(&self) -> Option<usize> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_safety_doc = note: `#[warn(clippy::unnecessary_safety_doc)]` on by default warning: safe function's docs have unnecessary `# Safety` section --> futures-util/src/future/future/shared.rs:154:5 | 154 | pub fn weak_count(&self) -> Option<usize> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_safety_doc ```
``` warning: non-binding `let` on a future --> futures-util/src/future/select_all.rs:61:17 | 61 | let _ = self.inner.swap_remove(idx); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider awaiting the future or dropping explicitly with `std::mem::drop` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future = note: `#[warn(clippy::let_underscore_future)]` on by default warning: non-binding `let` on a future --> futures/tests/async_await_macros.rs:385:5 | 385 | let _ = async { join!(async {}, async {}) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider awaiting the future or dropping explicitly with `std::mem::drop` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future = note: `#[warn(clippy::let_underscore_future)]` on by default warning: non-binding `let` on a future --> futures/tests/async_await_macros.rs:390:5 | 390 | let _ = async { try_join!(async { Ok::<(), ()>(()) }, async { Ok::<(), ()>(()) },) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider awaiting the future or dropping explicitly with `std::mem::drop` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future ```
- fix issue #2600. When an Unfold sink return an error it is left in an invalid state. Calling after that flush/close cause the sink to panic due to re-calling a future already completed. This patch aims to leave the sink in a valid state and allow calling flush/close without causing a panic.
Unlike `TryStream::try_chunks`, which has similar documentation and can handle `Some(Err(_))` specially, `Stream::ready_chunks` does not and cannot know whether the stream item represents an error condition, and does not include any code to return early on an error.
`ReadyChunks` fuses the inner stream, so `FusedStream` can be implemented for all stream types, not just those that initially implement `FusedStream`.
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:
Either::as_pin_mut
andEither::as_pin_ref
(AddEither::as_pin_mut
andEither::as_pin_ref
#2691)Shared::ptr_eq
andShared::ptr_hash
(AddEither::as_pin_mut
andEither::as_pin_ref
#2691)FusedStream
forBuffered
(impl FusedStream for Buffered #2676)FusedStream
for all streams inReadyChunks
(ImplementFusedStream
for all streams inReadyChunks
#2693)FuturesOrdered::push_front
(fix FuturesOrdered #2664)Fut::Output: Clone
bounds from someShared
methods (Do not require Clone for Shared::peek #2662)T: Debug
bounds fromDebug
implementations ofmpsc
andoneshot
types (RemoveDebug
constraint foroneshot
types #2666, CustomDebug
implementations formpsc
#2667)Closes #2698