about summary refs log tree commit diff
path: root/library/test/src/helpers/concurrency.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/test/src/helpers/concurrency.rs')
-rw-r--r--library/test/src/helpers/concurrency.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/test/src/helpers/concurrency.rs b/library/test/src/helpers/concurrency.rs
index eb211157371..b395adcf885 100644
--- a/library/test/src/helpers/concurrency.rs
+++ b/library/test/src/helpers/concurrency.rs
@@ -1,10 +1,10 @@
 //! Helper module which helps to determine amount of threads to be used
 //! during tests execution.
-use std::{env, num::NonZeroUsize, thread};
+use std::{env, num::NonZero, thread};
 
 pub fn get_concurrency() -> usize {
     if let Ok(value) = env::var("RUST_TEST_THREADS") {
-        match value.parse::<NonZeroUsize>().ok() {
+        match value.parse::<NonZero<usize>>().ok() {
             Some(n) => n.get(),
             _ => panic!("RUST_TEST_THREADS is `{value}`, should be a positive integer."),
         }