From be8d1ce3ce59312cab3e15ab88d0397f83b9433e Mon Sep 17 00:00:00 2001 From: sebcrozet Date: Sat, 29 Dec 2018 14:22:24 +0100 Subject: [PATCH] Fix compilation errors related to rand. --- src/debug/random_orthogonal.rs | 1 + src/debug/random_sdp.rs | 1 + src/geometry/unit_complex_construction.rs | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/debug/random_orthogonal.rs b/src/debug/random_orthogonal.rs index da06805b..6d393a24 100644 --- a/src/debug/random_orthogonal.rs +++ b/src/debug/random_orthogonal.rs @@ -48,6 +48,7 @@ where Owned: Clone + Send, { fn arbitrary(g: &mut G) -> Self { + use rand::Rng; let dim = D::try_to_usize().unwrap_or(g.gen_range(1, 50)); Self::new(D::from_usize(dim), || N::arbitrary(g)) } diff --git a/src/debug/random_sdp.rs b/src/debug/random_sdp.rs index c78d1fd1..7835c775 100644 --- a/src/debug/random_sdp.rs +++ b/src/debug/random_sdp.rs @@ -49,6 +49,7 @@ where Owned: Clone + Send, { fn arbitrary(g: &mut G) -> Self { + use rand::Rng; let dim = D::try_to_usize().unwrap_or(g.gen_range(1, 50)); Self::new(D::from_usize(dim), || N::arbitrary(g)) } diff --git a/src/geometry/unit_complex_construction.rs b/src/geometry/unit_complex_construction.rs index d8917e41..fa4a0451 100644 --- a/src/geometry/unit_complex_construction.rs +++ b/src/geometry/unit_complex_construction.rs @@ -7,10 +7,9 @@ use rand::distributions::{Distribution, OpenClosed01, Standard}; use rand::Rng; use alga::general::Real; -use base::allocator::Allocator; use base::dimension::{U1, U2}; use base::storage::Storage; -use base::{DefaultAllocator, Unit, Vector}; +use base::{Unit, Vector}; use geometry::{Rotation2, UnitComplex}; impl UnitComplex {