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

Fix redundant import warning #57

Merged
merged 1 commit into from
Mar 3, 2024
Merged

Fix redundant import warning #57

merged 1 commit into from
Mar 3, 2024

Conversation

taiki-e
Copy link
Collaborator

@taiki-e taiki-e commented Mar 3, 2024

error: the item `AsyncRead` is imported redundantly
   --> src/lib.rs:105:18
    |
105 | use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
    |                  ^^^^^^^^^
106 | use futures_lite::{future, prelude::*, ready};
    |                            ---------- the item `AsyncRead` is already imported here
    |
    = note: `-D unused-imports` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_imports)]`

error: the item `AsyncSeek` is imported redundantly
   --> src/lib.rs:105:29
    |
105 | use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
    |                             ^^^^^^^^^
106 | use futures_lite::{future, prelude::*, ready};
    |                            ---------- the item `AsyncSeek` is already imported here

error: the item `AsyncWrite` is imported redundantly
   --> src/lib.rs:105:40
    |
105 | use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
    |                                        ^^^^^^^^^^
106 | use futures_lite::{future, prelude::*, ready};
    |                            ---------- the item `AsyncWrite` is already imported here

@taiki-e
Copy link
Collaborator Author

taiki-e commented Mar 3, 2024

Oh, Cargo mixes dev-deps...

https://github.com/smol-rs/blocking/actions/runs/8130067781/job/22217900369?pr=57

error[E0405]: cannot find trait `AsyncRead` in this scope
   --> src/lib.rs:769:32
    |
769 | impl<T: Read + Send + 'static> AsyncRead for Unblock<T> {
    |                                ^^^^^^^^^ not found in this scope
    |
help: consider importing this trait
    |
87  + use futures_io::AsyncRead;
    |

error[E0[40](https://github.com/smol-rs/blocking/actions/runs/8130067781/job/22217900369?pr=57#step:6:41)5]: cannot find trait `AsyncWrite` in this scope
   --> src/lib.rs:837:33
    |
837 | impl<T: Write + Send + 'static> AsyncWrite for Unblock<T> {
    |                                 ^^^^^^^^^^ not found in this scope
    |
help: consider importing this trait
    |
87  + use futures_io::AsyncWrite;
    |

error[E0405]: cannot find trait `AsyncSeek` in this scope
   --> src/lib.rs:920:32
    |
920 | impl<T: Seek + Send + 'static> AsyncSeek for Unblock<T> {
    |                                ^^^^^^^^^ not found in this scope
    |
help: consider importing this trait
    |
87  + use futures_io::AsyncSeek;
    |

```
error: the item `AsyncRead` is imported redundantly
   --> src/lib.rs:105:18
    |
105 | use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
    |                  ^^^^^^^^^
106 | use futures_lite::{future, prelude::*, ready};
    |                            ---------- the item `AsyncRead` is already imported here
    |
    = note: `-D unused-imports` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_imports)]`

error: the item `AsyncSeek` is imported redundantly
   --> src/lib.rs:105:29
    |
105 | use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
    |                             ^^^^^^^^^
106 | use futures_lite::{future, prelude::*, ready};
    |                            ---------- the item `AsyncSeek` is already imported here

error: the item `AsyncWrite` is imported redundantly
   --> src/lib.rs:105:40
    |
105 | use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
    |                                        ^^^^^^^^^^
106 | use futures_lite::{future, prelude::*, ready};
    |                            ---------- the item `AsyncWrite` is already imported here
```
@taiki-e taiki-e changed the title Remove redundant imports Fix redundant import warning Mar 3, 2024
Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

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

Thanks!

@notgull notgull merged commit 22eaea7 into master Mar 3, 2024
8 checks passed
@notgull notgull deleted the taiki-e/ci branch March 3, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants