Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
Merge pull request #42 from eyelash/rand
Browse files Browse the repository at this point in the history
move rand to dev-dependencies
  • Loading branch information
Nathan Sobo committed Mar 13, 2018
2 parents 5ffc386 + d9ac3c5 commit 70279d9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion xray_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ authors = ["Nathan Sobo <nathan@github.com>"]
license = "MIT"

[dependencies]
rand = "0.3"
futures = "0.1"

[dev-dependencies]
rand = "0.3"
futures-cpupool = "0.1"
tokio-core = "0.1"
6 changes: 4 additions & 2 deletions xray_core/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,8 @@ fn find_insertion_index<T: Ord>(v: &Vec<T>, x: &T) -> usize {

#[cfg(test)]
mod tests {
extern crate rand;

use super::*;
use std::cmp::Ordering;

Expand Down Expand Up @@ -955,7 +957,7 @@ mod tests {

#[test]
fn random_splice() {
use rand::{Rng, SeedableRng, StdRng};
use self::rand::{Rng, SeedableRng, StdRng};

for seed in 0..100 {
println!("{:?}", seed);
Expand Down Expand Up @@ -1079,7 +1081,7 @@ mod tests {
#[test]
fn fragment_ids() {
for seed in 0..10 {
use rand::{Rng, SeedableRng, StdRng};
use self::rand::{Rng, SeedableRng, StdRng};
let mut rng = StdRng::from_seed(&[seed]);

let mut ids = vec![FragmentId(vec![0]), FragmentId(vec![4])];
Expand Down
1 change: 0 additions & 1 deletion xray_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
extern crate rand;
extern crate futures;

mod notify_cell;
Expand Down
3 changes: 2 additions & 1 deletion xray_core/src/notify_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ impl<T: Clone> Drop for NotifyCell<T> {

#[cfg(test)]
mod tests {
extern crate rand;
extern crate futures_cpupool;

use super::*;
use std::collections::BTreeSet;
use futures::Future;
use rand::{self, Rng};
use self::rand::Rng;
use self::futures_cpupool::CpuPool;

#[test]
Expand Down
4 changes: 3 additions & 1 deletion xray_core/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ impl<'tree, T: 'tree + Item> Cursor<'tree, T> {

#[cfg(test)]
mod tests {
extern crate rand;

use super::*;

#[derive(Default, Eq, PartialEq, Clone, Debug)]
Expand Down Expand Up @@ -582,7 +584,7 @@ mod tests {
#[test]
fn random() {
for seed in 0..100 {
use rand::{Rng, SeedableRng, StdRng};
use self::rand::{Rng, SeedableRng, StdRng};
let mut rng = StdRng::from_seed(&[seed]);

let mut tree = Tree::<u16>::new();
Expand Down

0 comments on commit 70279d9

Please sign in to comment.