diff --git a/src/iter/test.rs b/src/iter/test.rs index 62d7f4cb5..08fd57a4c 100644 --- a/src/iter/test.rs +++ b/src/iter/test.rs @@ -60,8 +60,7 @@ fn execute_unindexed_range() { #[test] fn execute_pseudo_indexed_range() { - use std::i128::MAX; - let range = MAX - 1024..MAX; + let range = i128::MAX - 1024..i128::MAX; // Given `Some` length, collecting `Vec` will try to act indexed. let a = range.clone().into_par_iter(); diff --git a/src/range.rs b/src/range.rs index b7131b63a..ed906c7b9 100644 --- a/src/range.rs +++ b/src/range.rs @@ -18,9 +18,7 @@ use crate::iter::plumbing::*; use crate::iter::*; -use std::char; use std::ops::Range; -use std::usize; /// Parallel iterator over a range, implemented for all integer types and `char`. /// @@ -378,8 +376,6 @@ fn check_range_split_at_overflow() { #[test] fn test_i128_len_doesnt_overflow() { - use std::{i128, u128}; - // Using parse because some versions of rust don't allow long literals let octillion: i128 = "1000000000000000000000000000".parse().unwrap(); let producer = IterProducer { @@ -395,7 +391,6 @@ fn test_i128_len_doesnt_overflow() { #[test] fn test_u64_opt_len() { - use std::{u64, usize}; assert_eq!(Some(100), (0..100u64).into_par_iter().opt_len()); assert_eq!( Some(usize::MAX), @@ -414,7 +409,6 @@ fn test_u64_opt_len() { #[test] fn test_u128_opt_len() { - use std::{u128, usize}; assert_eq!(Some(100), (0..100u128).into_par_iter().opt_len()); assert_eq!( Some(usize::MAX), @@ -430,7 +424,6 @@ fn test_u128_opt_len() { #[cfg(target_pointer_width = "64")] fn test_usize_i64_overflow() { use crate::ThreadPoolBuilder; - use std::i64; let iter = (-2..i64::MAX).into_par_iter(); assert_eq!(iter.opt_len(), Some(i64::MAX as usize + 2)); diff --git a/src/range_inclusive.rs b/src/range_inclusive.rs index b7bb0cac7..9c10f0805 100644 --- a/src/range_inclusive.rs +++ b/src/range_inclusive.rs @@ -18,7 +18,6 @@ use crate::iter::plumbing::*; use crate::iter::*; -use std::char; use std::ops::RangeInclusive; /// Parallel iterator over an inclusive range, implemented for all integer types and `char`. @@ -313,7 +312,6 @@ impl IndexedParallelIterator for Iter { #[test] #[cfg(target_pointer_width = "64")] fn test_u32_opt_len() { - use std::u32; assert_eq!(Some(101), (0..=100u32).into_par_iter().opt_len()); assert_eq!( Some(u32::MAX as usize), @@ -327,7 +325,6 @@ fn test_u32_opt_len() { #[test] fn test_u64_opt_len() { - use std::{u64, usize}; assert_eq!(Some(101), (0..=100u64).into_par_iter().opt_len()); assert_eq!( Some(usize::MAX), @@ -339,7 +336,6 @@ fn test_u64_opt_len() { #[test] fn test_u128_opt_len() { - use std::{u128, usize}; assert_eq!(Some(101), (0..=100u128).into_par_iter().opt_len()); assert_eq!( Some(usize::MAX), @@ -355,7 +351,6 @@ fn test_u128_opt_len() { #[cfg(target_pointer_width = "64")] fn test_usize_i64_overflow() { use crate::ThreadPoolBuilder; - use std::i64; let iter = (-2..=i64::MAX).into_par_iter(); assert_eq!(iter.opt_len(), Some(i64::MAX as usize + 3)); diff --git a/tests/chars.rs b/tests/chars.rs index ac8e3f304..6e2804f40 100644 --- a/tests/chars.rs +++ b/tests/chars.rs @@ -1,5 +1,4 @@ use rayon::prelude::*; -use std::char; #[test] fn half_open_correctness() {