Skip to content
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
merged 24 commits into from
Jan 30, 2023
Merged

Release 0.3.26 #2699

merged 24 commits into from
Jan 30, 2023

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Jan 30, 2023

Changes:

Closes #2698

stepancheg and others added 24 commits January 31, 2023 00:25
`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`.
@taiki-e taiki-e added the futures-0.3 Issue related to the 0.3 versions of futures label Jan 30, 2023
@taiki-e taiki-e merged commit 5e3693a into 0.3 Jan 30, 2023
@taiki-e taiki-e deleted the 0.3-next branch January 30, 2023 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
futures-0.3 Issue related to the 0.3 versions of futures
Projects
None yet
Development

Successfully merging this pull request may close these issues.