From 29796dc637267ba8b36adb8877bbd422c2dfc7f0 Mon Sep 17 00:00:00 2001 From: Max Blachman Date: Sat, 7 Dec 2019 00:13:27 -0800 Subject: [PATCH] remove call to range.contains() range.contains is unstable in rust 1.34, which is supported by this library. --- src/arbitrary.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 532946d..ada5746 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1013,7 +1013,6 @@ mod test { use std::hash::Hash; use std::num::Wrapping; use std::path::PathBuf; - use super::Arbitrary; use super::StdGen; #[test] @@ -1047,7 +1046,7 @@ mod test { let mut lim = lim.peekable(); while let (Some(low), Some(&high)) = (lim.next(), lim.peek()) { assert!(arbys.iter() - .find(|arby| (low..=high).contains(arby)) + .find(|arby| low <= **arby && **arby <= high) .is_some(), "Arbitrary doesn't generate numbers in {}..={}", low, high) }