From 54e7f01eacc602ef2145b70f85982f9f3b780f1d Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Tue, 30 Apr 2019 15:22:41 +0300 Subject: [PATCH 1/2] rand_jitter error type fix --- rand_jitter/src/error.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rand_jitter/src/error.rs b/rand_jitter/src/error.rs index b8bc37f6b38..a3483e84d0f 100644 --- a/rand_jitter/src/error.rs +++ b/rand_jitter/src/error.rs @@ -59,8 +59,12 @@ impl From for Error { fn from(err: TimerError) -> Error { // Timer check is already quite permissive of failures so we don't // expect false-positive failures, i.e. any error is irrecoverable. - Error::with_cause(ErrorKind::Unavailable, - "timer jitter failed basic quality tests", err) + #[cfg(feature = "std")] { + Error::with_cause(ErrorKind::Unavailable, "timer jitter failed basic quality tests", err) + } + #[cfg(not(feature = "std"))] { + Error::new(ErrorKind::Unavailable, "timer jitter failed basic quality tests") + } } } From 673c6ab6392a5bbad0c67d70b6d6af483b21067f Mon Sep 17 00:00:00 2001 From: newpavlov Date: Thu, 2 May 2019 08:11:21 +0300 Subject: [PATCH 2/2] rand_jitter v0.1.4 --- rand_jitter/CHANGELOG.md | 3 +++ rand_jitter/Cargo.toml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rand_jitter/CHANGELOG.md b/rand_jitter/CHANGELOG.md index 961946e1d92..bbb21dcbf2f 100644 --- a/rand_jitter/CHANGELOG.md +++ b/rand_jitter/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.4] - 2019-05-02 +- Change error conversion code to partially fix #738 + ## [0.1.3] - 2019-02-05 - Use libc in `no_std` mode to fix #723 diff --git a/rand_jitter/Cargo.toml b/rand_jitter/Cargo.toml index c8a350b0e0d..d968ea4bd34 100644 --- a/rand_jitter/Cargo.toml +++ b/rand_jitter/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "rand_jitter" -version = "0.1.3" +version = "0.1.4" authors = ["The Rand Project Developers"] -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/rust-random/rand" documentation = "https://docs.rs/rand_jitter"