From 20a8b5ac9eb1f90dbcefa187c4e5ccaf111fa0fb Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Thu, 6 Apr 2023 09:45:13 +0200 Subject: [PATCH 1/2] factor: fix "unused import" warning in test --- tests/by-util/test_factor.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/by-util/test_factor.rs b/tests/by-util/test_factor.rs index 23da2ea69f7..64eb2a64084 100644 --- a/tests/by-util/test_factor.rs +++ b/tests/by-util/test_factor.rs @@ -8,7 +8,7 @@ // spell-checker:ignore (methods) hexdigest -use crate::common::util::{AtPath, TestScenario}; +use crate::common::util::TestScenario; use std::time::{Duration, SystemTime}; @@ -33,6 +33,7 @@ fn test_invalid_arg() { #[test] #[cfg(feature = "sort")] fn test_parallel() { + use crate::common::util::AtPath; use hex_literal::hex; use sha1::{Digest, Sha1}; use std::{fs::OpenOptions, time::Duration}; From 74a95bc7a585b65305ac5f9609f8b013e7efced8 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Thu, 6 Apr 2023 09:47:21 +0200 Subject: [PATCH 2/2] factor: expand glob import in test --- tests/by-util/test_factor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/by-util/test_factor.rs b/tests/by-util/test_factor.rs index 64eb2a64084..9c818df2496 100644 --- a/tests/by-util/test_factor.rs +++ b/tests/by-util/test_factor.rs @@ -118,7 +118,7 @@ fn test_cli_args() { #[test] fn test_random() { - use conv::prelude::*; + use conv::prelude::ValueFrom; let log_num_primes = f64::value_from(NUM_PRIMES).unwrap().log2().ceil(); let primes = Sieve::primes().take(NUM_PRIMES).collect::>();