Skip to content

Commit

Permalink
Remove redundant imports (#1522)
Browse files Browse the repository at this point in the history
Recent nightlies warn for items which are imported redundantly, of which
there were a few in the `elliptic-curve` and `password-hash` crates
  • Loading branch information
tarcieri committed Feb 25, 2024
1 parent cce3b05 commit 60297e6
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 20 deletions.
1 change: 0 additions & 1 deletion elliptic-curve/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use crate::{
bigint::{Limb, U256},
error::{Error, Result},
ops::{Invert, LinearCombination, MulByGenerator, Reduce, ShrAssign},
pkcs8,
point::AffineCoordinates,
rand_core::RngCore,
scalar::{FromUintUnchecked, IsHigh},
Expand Down
3 changes: 0 additions & 3 deletions elliptic-curve/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

use core::fmt::{self, Display};

#[cfg(feature = "pkcs8")]
use crate::pkcs8;

/// Result type with the `elliptic-curve` crate's [`Error`] type.
pub type Result<T> = core::result::Result<T, Error>;

Expand Down
5 changes: 1 addition & 4 deletions elliptic-curve/src/hash2curve/hash2field/expand_msg/xof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ mod test {
use super::*;
use core::mem;
use hex_literal::hex;
use hybrid_array::{
typenum::{U128, U32},
Array, ArraySize,
};
use hybrid_array::{typenum::U128, Array, ArraySize};
use sha3::Shake128;

fn assert_message(msg: &[u8], domain: &Domain<'_, U32>, len_in_bytes: u16, bytes: &[u8]) {
Expand Down
5 changes: 1 addition & 4 deletions elliptic-curve/src/public_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ use pkcs8::DecodePublicKey;

#[cfg(all(feature = "sec1", feature = "pkcs8"))]
use {
crate::{
pkcs8::{self, AssociatedOid},
ALGORITHM_OID,
},
crate::{pkcs8::AssociatedOid, ALGORITHM_OID},
pkcs8::der,
};

Expand Down
2 changes: 1 addition & 1 deletion elliptic-curve/src/secret_key/pkcs8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use super::SecretKey;
use crate::{
pkcs8::{self, der::Decode, AssociatedOid},
pkcs8::{der::Decode, AssociatedOid},
sec1::{ModulusSize, ValidatePublicKey},
Curve, FieldBytesSize, ALGORITHM_OID,
};
Expand Down
6 changes: 1 addition & 5 deletions password-hash/src/output.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
//! Outputs from password hashing functions.

use crate::{Encoding, Error, Result};
use core::{
cmp::{Ordering, PartialEq},
fmt,
str::FromStr,
};
use core::{cmp::Ordering, fmt, str::FromStr};
use subtle::{Choice, ConstantTimeEq};

/// Output from password hashing functions, i.e. the "hash" or "digest"
Expand Down
3 changes: 1 addition & 2 deletions password-hash/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use crate::{
};
use core::{
fmt::{self, Debug, Write},
iter::FromIterator,
str::{self, FromStr},
};

Expand Down Expand Up @@ -328,7 +327,7 @@ impl Write for Buffer {

#[cfg(test)]
mod tests {
use super::{Error, FromIterator, Ident, ParamsString, Value};
use super::{Error, Ident, ParamsString, Value};

#[cfg(feature = "alloc")]
use alloc::string::ToString;
Expand Down

0 comments on commit 60297e6

Please sign in to comment.