Skip to content

proj: fix new clippy unused imports finding #227

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

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

cpu
Copy link
Member

@cpu cpu commented Feb 19, 2024

The std::convert::TryFrom import is part of the rust 2021 edition prelude and so importing it explicitly is redundant. This results in a clippy error for CI builds using nightly:

warning: the item `TryFrom` is imported redundantly
   --> rcgen/src/lib.rs:41:5
    |
41  | use std::convert::TryFrom;
    |     ^^^^^^^^^^^^^^^^^^^^^
    |
   ::: /home/daniel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:129:13
    |
129 |     pub use core::prelude::rust_2021::*;
    |             ------------------------ the item `TryFrom` is already defined here
    |
    = note: `#[warn(unused_imports)]` on by default

The `std::convert::TryFrom` import is part of the rust 2021 edition
prelude and so importing it explicitly is redundant:

```
warning: the item `TryFrom` is imported redundantly
   --> rcgen/src/lib.rs:41:5
    |
41  | use std::convert::TryFrom;
    |     ^^^^^^^^^^^^^^^^^^^^^
    |
   ::: /home/daniel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:129:13
    |
129 |     pub use core::prelude::rust_2021::*;
    |             ------------------------ the item `TryFrom` is already defined here
    |
    = note: `#[warn(unused_imports)]` on by default
```
@cpu cpu self-assigned this Feb 19, 2024
Copy link
Member

@est31 est31 left a comment

Choose a reason for hiding this comment

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

Good catch!

@cpu cpu added this pull request to the merge queue Feb 19, 2024
Merged via the queue into rustls:main with commit 3c3e984 Feb 20, 2024
@cpu cpu deleted the cpu-fix-clippy branch February 20, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants