Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 35 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ facet = { version = "0.46.5", optional = true, default-features = false, feature
num-cmp = { version = "0.1.0", optional = true }
num-traits = { version = "0.2.9", default-features = false }
proptest = { version = "1.0.0", optional = true }
rand = { version = "0.8.3", optional = true, default-features = false }
rand = { version = "0.10.3", optional = true, default-features = false }
rkyv = { version = "0.7.41", optional = true, default-features = false, features = ["rend"] }
rkyv_08 = { version = "0.8", optional = true, default-features = false, package = "rkyv" }
schemars = { version = "0.8.8", optional = true }
Expand All @@ -39,7 +39,7 @@ default = ["std"]
facet = ["dep:facet"]
std = ["num-traits/std"]
libm = ["num-traits/libm"]
serde = ["dep:serde", "rand?/serde1"]
serde = ["dep:serde", "rand?/serde"]
randtest = ["rand/std", "rand/std_rng"]
rkyv = ["rkyv_32"]
rkyv_16 = ["dep:rkyv", "rkyv?/size_16"]
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2236,7 +2236,6 @@
use self::serde::de::{Error, Unexpected};
use self::serde::{Deserialize, Deserializer, Serialize, Serializer};
use super::{NotNan, OrderedFloat};
use core::f64;
use num_traits::float::FloatCore;

#[cfg(test)]
Expand Down Expand Up @@ -2791,8 +2790,8 @@
mod impl_rand {
use super::{NotNan, OrderedFloat};
use rand::Rng;
use rand::distributions::uniform::*;

Check failure on line 2793 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

cannot find `distributions` in `rand`
use rand::distributions::{Distribution, Open01, OpenClosed01, Standard};

Check failure on line 2794 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

unresolved import `rand::distributions`

macro_rules! impl_distribution {
($dist:ident, $($f:ty),+) => {
Expand Down Expand Up @@ -2822,16 +2821,16 @@
/// A sampler for a uniform distribution
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct UniformNotNan<T>(UniformFloat<T>);

Check failure on line 2824 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

cannot find type `UniformFloat` in this scope
impl SampleUniform for NotNan<f32> {

Check failure on line 2825 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

cannot find trait `SampleUniform` in this scope
type Sampler = UniformNotNan<f32>;
}
impl SampleUniform for NotNan<f64> {

Check failure on line 2828 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

cannot find trait `SampleUniform` in this scope
type Sampler = UniformNotNan<f64>;
}
impl<T> PartialEq for UniformNotNan<T>
where
UniformFloat<T>: PartialEq,

Check failure on line 2833 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

cannot find type `UniformFloat` in this scope
{
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
Expand All @@ -2841,16 +2840,16 @@
/// A sampler for a uniform distribution
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct UniformOrdered<T>(UniformFloat<T>);

Check failure on line 2843 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

cannot find type `UniformFloat` in this scope
impl SampleUniform for OrderedFloat<f32> {

Check failure on line 2844 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

cannot find trait `SampleUniform` in this scope
type Sampler = UniformOrdered<f32>;
}
impl SampleUniform for OrderedFloat<f64> {

Check failure on line 2847 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

cannot find trait `SampleUniform` in this scope
type Sampler = UniformOrdered<f64>;
}
impl<T> PartialEq for UniformOrdered<T>
where
UniformFloat<T>: PartialEq,

Check failure on line 2852 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Tests (stable)

cannot find type `UniformFloat` in this scope
{
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
Expand Down Expand Up @@ -3106,7 +3105,7 @@
Err(CheckedCastError::InvalidBitPattern),
);

let pi = core::f64::consts::PI;
let pi = f64::consts::PI;
assert!(try_cast::<f64, NotNan<f64>>(pi).is_ok());
}
}
Loading