From d54b13d4c98e6458630e081845b466a687f9b183 Mon Sep 17 00:00:00 2001 From: Thomas Hurst Date: Fri, 4 Jan 2019 02:35:23 +0000 Subject: [PATCH] Update to rand 0.6, bump to 0.3 --- Cargo.toml | 4 ++-- src/lib.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3dfce31..be7a3c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linereader" -version = "0.2.0" +version = "0.3.0" authors = ["Thomas Hurst "] description = "An efficient buffered line reader." homepage = "https://github.com/Freaky/rust-linereader" @@ -18,4 +18,4 @@ maintenance = { status = "actively-developed" } memchr = "2" [dev-dependencies] -rand = "0.4.0" +rand = "0.6.0" diff --git a/src/lib.rs b/src/lib.rs index de25c9c..fdf7d4b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -317,15 +317,15 @@ mod tests { extern crate rand; use std::io::BufRead; use std::io::{Cursor, Read}; - use tests::rand::Rng; + use tests::rand::prelude::*; #[test] fn test_next_line_randomly() { - let mut rng = rand::thread_rng(); + let mut rng = thread_rng(); for _ in 1..128 { let mut buf = [0u8; 65535]; - rng.fill_bytes(&mut buf); + rng.fill(&mut buf[..]); let delimiter = rng.gen::(); let max_line = rng.gen::().saturating_add(8) as usize;