Merge pull request #1208 from newpavlov/rand_distr/fix_no_std

rand_distr: fix no_std build
diff --git a/rand_distr/CHANGELOG.md b/rand_distr/CHANGELOG.md
index b93933e..6b0cda2 100644
--- a/rand_distr/CHANGELOG.md
+++ b/rand_distr/CHANGELOG.md
@@ -4,6 +4,9 @@
 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.4.3] - 2021-12-30
+- Fix `no_std` build (#1208)
+
 ## [0.4.2] - 2021-09-18
 - New `Zeta` and `Zipf` distributions (#1136)
 - New `SkewNormal` distribution (#1149)
diff --git a/rand_distr/Cargo.toml b/rand_distr/Cargo.toml
index 8a9638c..32a5fca 100644
--- a/rand_distr/Cargo.toml
+++ b/rand_distr/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "rand_distr"
-version = "0.4.2"
+version = "0.4.3"
 authors = ["The Rand Project Developers"]
 license = "MIT OR Apache-2.0"
 readme = "README.md"
diff --git a/rand_distr/src/binomial.rs b/rand_distr/src/binomial.rs
index 8e7513a..d1637b6 100644
--- a/rand_distr/src/binomial.rs
+++ b/rand_distr/src/binomial.rs
@@ -13,6 +13,8 @@
 use rand::Rng;
 use core::fmt;
 use core::cmp::Ordering;
+#[allow(unused_imports)]
+use num_traits::Float;
 
 /// The binomial distribution `Binomial(n, p)`.
 ///
diff --git a/rand_distr/src/geometric.rs b/rand_distr/src/geometric.rs
index 7988261..78ad6cc 100644
--- a/rand_distr/src/geometric.rs
+++ b/rand_distr/src/geometric.rs
@@ -3,6 +3,8 @@
 use crate::Distribution;
 use rand::Rng;
 use core::fmt;
+#[allow(unused_imports)]
+use num_traits::Float;
 
 /// The geometric distribution `Geometric(p)` bounded to `[0, u64::MAX]`.
 /// 
diff --git a/rand_distr/src/hypergeometric.rs b/rand_distr/src/hypergeometric.rs
index 8ab2dca..9a52909 100644
--- a/rand_distr/src/hypergeometric.rs
+++ b/rand_distr/src/hypergeometric.rs
@@ -4,6 +4,8 @@
 use rand::Rng;
 use rand::distributions::uniform::Uniform;
 use core::fmt;
+#[allow(unused_imports)]
+use num_traits::Float;
 
 #[derive(Clone, Copy, Debug)]
 #[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
diff --git a/rand_distr/src/utils.rs b/rand_distr/src/utils.rs
index f097bb4..4638e36 100644
--- a/rand_distr/src/utils.rs
+++ b/rand_distr/src/utils.rs
@@ -11,6 +11,7 @@
 use crate::ziggurat_tables;
 use rand::distributions::hidden_export::IntoFloat;
 use rand::Rng;
+use num_traits::Float;
 
 /// Calculates ln(gamma(x)) (natural logarithm of the gamma
 /// function) using the Lanczos approximation.
@@ -25,7 +26,7 @@
 /// `Ag(z)` is an infinite series with coefficients that can be calculated
 /// ahead of time - we use just the first 6 terms, which is good enough
 /// for most purposes.
-pub(crate) fn log_gamma<F: num_traits::Float>(x: F) -> F {
+pub(crate) fn log_gamma<F: Float>(x: F) -> F {
     // precalculated 6 coefficients for the first 6 terms of the series
     let coefficients: [F; 6] = [
         F::from(76.18009172947146).unwrap(),