From d9476daf874894c58016749b548de363ea0f3936 Mon Sep 17 00:00:00 2001 From: Vinzent Steinberg Date: Fri, 12 Jul 2019 16:59:38 +0200 Subject: [PATCH] Update rand --- Cargo.toml | 4 ++-- src/x25519.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 41976ff..4a4d0e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,12 +29,12 @@ features = ["nightly"] [dependencies] curve25519-dalek = { version = "1", default-features = false } -rand_core = { version = "0.3", default-features = false } +rand_core = { version = "0.5", default-features = false } clear_on_drop = { version = "0.2" } [dev-dependencies] criterion = "0.2" -rand_os = "0.1" +rand_os = "0.2" [[bench]] name = "x25519" diff --git a/src/x25519.rs b/src/x25519.rs index 30f5bdb..0e9b659 100644 --- a/src/x25519.rs +++ b/src/x25519.rs @@ -200,7 +200,7 @@ mod test { // lives here. #[test] fn alice_and_bob() { - let mut csprng = OsRng::new().unwrap(); + let mut csprng = OsRng; let alice_secret = EphemeralSecret::new(&mut csprng); let alice_public = PublicKey::from(&alice_secret); let bob_secret = EphemeralSecret::new(&mut csprng);