From 374fa364decf953bb3dc4c202a9a911e33f32772 Mon Sep 17 00:00:00 2001 From: Jason Staten Date: Wed, 16 Jan 2019 22:05:51 -0700 Subject: [PATCH] 2018 --- Cargo.toml | 1 + src/ch05_bigo/search.rs | 2 +- src/ch07_algorithms/bench.rs | 6 ++---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fec7d42..efab5a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ authors = ["Jason Staten "] name = "imposters" version = "0.1.0" +edition = "2018" [dev-dependencies] quickcheck = "0.6.2" rand = "0.5.3" diff --git a/src/ch05_bigo/search.rs b/src/ch05_bigo/search.rs index 62b6ed2..c5e8893 100644 --- a/src/ch05_bigo/search.rs +++ b/src/ch05_bigo/search.rs @@ -27,7 +27,7 @@ pub fn binary_search(arr: &[T], el: T) -> bool { #[cfg(test)] mod test { use super::*; - use test::{black_box, Bencher}; + use ::test::{black_box, Bencher}; #[test] fn test_brute_force_miss() { diff --git a/src/ch07_algorithms/bench.rs b/src/ch07_algorithms/bench.rs index 6360b8d..5051dd6 100644 --- a/src/ch07_algorithms/bench.rs +++ b/src/ch07_algorithms/bench.rs @@ -1,16 +1,14 @@ #![allow(unused)] #![allow(dead_code)] -extern crate rand; use super::bubble; use super::heap; use super::insertion; use super::merge; use super::selection; -use ch07_algorithms::bench::rand::Rng; +use rand::Rng; -extern crate test; -use test::{black_box, Bencher}; +use ::test::{black_box, Bencher}; fn generate_data() -> Vec { let mut rng = rand::thread_rng();