diff --git a/CHANGELOG.md b/CHANGELOG.md index e6a3863..be2eb2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Entries are listed in reverse chronological order. +## 2.7.0 + +* Update `rand` dependency to 0.9 + ## 2.5.0 * Add constant-timedness note to the documentation for `CtOption::unwrap_or_else`. diff --git a/Cargo.toml b/Cargo.toml index ae7361c..ad11682 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ name = "subtle" # - update html_root_url # - update README if necessary by semver # - if any updates were made to the README, also update the module documentation in src/lib.rs -version = "2.6.0" +version = "2.7.0" edition = "2018" authors = ["Isis Lovecruft ", "Henry de Valence "] @@ -26,7 +26,7 @@ exclude = [ travis-ci = { repository = "dalek-cryptography/subtle", branch = "master"} [dev-dependencies] -rand = { version = "0.8" } +rand = { version = "0.9" } [features] const-generics = [] diff --git a/src/lib.rs b/src/lib.rs index b6e42c4..3ac476d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ #![no_std] #![deny(missing_docs)] #![doc(html_logo_url = "https://doc.dalek.rs/assets/dalek-logo-clear.png")] -#![doc(html_root_url = "https://docs.rs/subtle/2.6.0")] +#![doc(html_root_url = "https://docs.rs/subtle/2.7.0")] //! # subtle [![](https://img.shields.io/crates/v/subtle.svg)](https://crates.io/crates/subtle) [![](https://img.shields.io/badge/dynamic/json.svg?label=docs&uri=https%3A%2F%2Fcrates.io%2Fapi%2Fv1%2Fcrates%2Fsubtle%2Fversions&query=%24.versions%5B0%5D.num&colorB=4F74A6)](https://doc.dalek.rs/subtle) [![](https://travis-ci.org/dalek-cryptography/subtle.svg?branch=master)](https://travis-ci.org/dalek-cryptography/subtle) //! diff --git a/tests/mod.rs b/tests/mod.rs index 888b9d0..f462ad9 100644 --- a/tests/mod.rs +++ b/tests/mod.rs @@ -1,7 +1,7 @@ use std::cmp; use rand::rngs::OsRng; -use rand::RngCore; +use rand::TryRngCore; use subtle::*; @@ -313,8 +313,8 @@ fn unwrap_none_ctoption() { macro_rules! generate_greater_than_test { ($ty: ty) => { for _ in 0..100 { - let x = OsRng.next_u64() as $ty; - let y = OsRng.next_u64() as $ty; + let x = OsRng.try_next_u64().unwrap() as $ty; + let y = OsRng.try_next_u64().unwrap() as $ty; let z = x.ct_gt(&y); println!("x={}, y={}, z={:?}", x, y, z); @@ -375,8 +375,8 @@ fn less_than_twos_compliment_minmax() { macro_rules! generate_less_than_test { ($ty: ty) => { for _ in 0..100 { - let x = OsRng.next_u64() as $ty; - let y = OsRng.next_u64() as $ty; + let x = OsRng.try_next_u64().unwrap() as $ty; + let y = OsRng.try_next_u64().unwrap() as $ty; let z = x.ct_gt(&y); println!("x={}, y={}, z={:?}", x, y, z);