Skip to content

Commit

Permalink
Fix warnings when running tests in nostd mode
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Aug 5, 2020
1 parent 2011744 commit 1903437
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/algorithms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use digest::DynDigest;
use num_bigint::traits::ModInverse;
use num_bigint::{BigUint, RandPrime};
use num_traits::{FromPrimitive, One, Zero};
#[cfg(not(feature = "std"))]
use num_traits::{Float};
#[allow(unused_imports)]
use num_traits::Float;
use rand::Rng;
use alloc::vec;

Expand Down
4 changes: 2 additions & 2 deletions src/pss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ mod test {
let sig = hex::decode(test[1]).unwrap();

let seed = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap();
let mut rng = StdRng::seed_from_u64(seed.as_secs());
let rng = StdRng::seed_from_u64(seed.as_secs());
pub_key
.verify(
PaddingScheme::new_pss::<Sha1, _>(rng),
Expand All @@ -299,7 +299,7 @@ mod test {
let tests = ["test\n"];

let seed = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap();
let mut rng = StdRng::seed_from_u64(seed.as_secs());
let rng = StdRng::seed_from_u64(seed.as_secs());

for test in &tests {
let digest = Sha1::digest(test.as_bytes()).to_vec();
Expand Down

0 comments on commit 1903437

Please sign in to comment.