diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 696cb12..bdd33f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,6 +94,11 @@ jobs: if: ${{ matrix.variant == 'minimal_versions' }} run: | cargo generate-lockfile -Z minimal-versions + - name: Build rand_distr + run: | + cargo build --target ${{ matrix.target }} --features=serde + cargo build --target ${{ matrix.target }} --no-default-features + cargo build --target ${{ matrix.target }} --no-default-features --features=std,std_math - name: Test rand_distr run: | cargo test --target ${{ matrix.target }} --features=serde diff --git a/CHANGELOG.md b/CHANGELOG.md index a75e125..293072c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ 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.5.1] + +### Testing +- Added building the crate to CI + +### Fixes +- Fix missing import for `no_std` builds + ## [0.5.0] - 2025-01-27 ### Dependencies and features diff --git a/Cargo.toml b/Cargo.toml index 0e3d709..02c7cea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rand_distr" -version = "0.5.0" +version = "0.5.1" authors = ["The Rand Project Developers"] license = "MIT OR Apache-2.0" readme = "README.md" diff --git a/distr_test/Cargo.toml b/distr_test/Cargo.toml index 9181d86..a9f9900 100644 --- a/distr_test/Cargo.toml +++ b/distr_test/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" publish = false [dev-dependencies] -rand_distr = { path = "..", version = "0.5.0", default-features = false, features = ["alloc"] } +rand_distr = { path = "..", version = "0.5.1", default-features = false, features = ["alloc"] } rand = { version = "0.9.0", features = ["small_rng"] } num-traits = "0.2.19" # Special functions for testing distributions diff --git a/src/utils.rs b/src/utils.rs index ebc2fb5..fb3038c 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -9,6 +9,8 @@ //! Math helper functions use crate::ziggurat_tables; +#[allow(unused_imports)] +use num_traits::Float; // Used for `no_std` to get `f64::abs()` working before `rustc 1.84` use rand::distr::hidden_export::IntoFloat; use rand::Rng;