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

test: fix version requirement of tokio-stream #4376

Merged
merged 1 commit into from
Jan 4, 2022
Merged

test: fix version requirement of tokio-stream #4376

merged 1 commit into from
Jan 4, 2022

Conversation

robjtede
Copy link
Contributor

@robjtede robjtede commented Jan 4, 2022

Motivation

cargo minimal-versions check (taiki-e/cargo-minimal-versions) should succeed on a project with tokio-test as a dependency.

Currently fails here:

...
    Checking tokio-stream v0.1.0
    Checking tokio-test v0.4.2
error[E0432]: unresolved import `tokio_stream::wrappers`
  --> /Users/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-test-0.4.2/src/io.rs:24:19
   |
24 | use tokio_stream::wrappers::UnboundedReceiverStream;
   |                   ^^^^^^^^ could not find `wrappers` in `tokio_stream`

error[E0599]: no method named `poll_next` found for struct `Pin<_>` in the current scope
   --> /Users/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-test-0.4.2/src/io.rs:206:32
    |
206 |         Pin::new(&mut self.rx).poll_next(cx)
    |                                ^^^^^^^^^ method not found in `Pin<_>`
    |
    = note: `Pin::new(&mut self.rx)` is a function, perhaps you wish to call it
...

Solution

Use the correct minimal version of tokio-stream which appears to be 0.1.1 when the wrappers module was introduced.

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@Darksonn Darksonn added the A-tokio-test Area: The tokio-test crate label Jan 4, 2022
@Darksonn Darksonn merged commit 25e5141 into tokio-rs:master Jan 4, 2022
@robjtede robjtede deleted the fix-min-ver-tokio-test branch January 4, 2022 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio-test Area: The tokio-test crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants