dalek-cryptography / curve25519-dalek

A pure-Rust implementation of group operations on Ristretto and Curve25519
Other
850 stars 416 forks source link

curve25519: nightly CI seems borked w/ warn(unused_imports) #637

Closed pinkforest closed 4 months ago

pinkforest commented 4 months ago

Happened on my PR:

https://github.com/dalek-cryptography/curve25519-dalek/actions/runs/8051602263/job/21989865551?pr=636

Seems there is a new lint or something w/ nightly relating to redundant imports ?

warning: the item `Eq` is imported redundantly
   --> curve25519-dalek/src/scalar.rs:115:17
    |
115 | use core::cmp::{Eq, PartialEq};
    |                 ^^
    |
   ::: /home/foobar/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/prelude/mod.rs:38:13
    |
38  |     pub use super::v1::*;
    |             --------- the item `Eq` is already defined here
    |
    = note: `#[warn(unused_imports)]` on by default

warning: the item `PartialEq` is imported redundantly
   --> curve25519-dalek/src/scalar.rs:115:21
    |
115 | use core::cmp::{Eq, PartialEq};
    |                     ^^^^^^^^^
    |

To resolve need to remove the redundant imports warns.

EDIT: Oh wait this is something how prelude may have changed / borkd ? :O

EDIT.2: Seems a new lint for redundant imports ?

warning: the item `RngCore` is imported redundantly
    --> curve25519-dalek/src/edwards.rs:1603:9
     |
1593 |     use super::*;
     |         -------- the item `RngCore` is already imported here
...
1603 |     use rand_core::RngCore;
     |         ^^^^^^^^^^^^^^^^^^