diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d47bf37..33cd57ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Re-export of `core::convert::Infallible` ([#56]) +### Changed +- `TryRng::Error` is bound on `core::error::Error` instead of `Debug + Display` ([#58]) + ### Other - Changed repository from [rust-random/rand] to [rust-random/core]. @@ -56,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#45]: https://github.com/rust-random/rand-core/pull/45 [#53]: https://github.com/rust-random/rand-core/pull/53 [#56]: https://github.com/rust-random/rand-core/pull/56 +[#58]: https://github.com/rust-random/rand-core/pull/58 [rust-random/rand]: https://github.com/rust-random/rand [rust-random/core]: https://github.com/rust-random/core diff --git a/src/lib.rs b/src/lib.rs index 668da0e4..4d656816 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,7 +13,7 @@ clippy::undocumented_unsafe_blocks )] -use core::{fmt, ops::DerefMut}; +use core::ops::DerefMut; pub use core::convert::Infallible; @@ -186,7 +186,7 @@ pub trait TryRng { /// The type returned in the event of a RNG error. /// /// Use type [`Infallible`] (re-exported by `rand_core`) for infallible implementations. - type Error: fmt::Debug + fmt::Display; + type Error: core::error::Error; /// Return the next random `u32`. fn try_next_u32(&mut self) -> Result;