@@ -7,7 +7,7 @@ use rustup_macros::unit_test as test;
77use crate :: test:: test_dir;
88
99use super :: { get_executor, Executor , Item , Kind } ;
10- use crate :: currentprocess;
10+ use crate :: currentprocess:: { self , TestProcess } ;
1111
1212impl Item {
1313 /// The length of the file, for files (for stats)
@@ -23,10 +23,7 @@ fn test_incremental_file(io_threads: &str) -> Result<()> {
2323 let work_dir = test_dir ( ) ?;
2424 let mut vars = HashMap :: new ( ) ;
2525 vars. insert ( "RUSTUP_IO_THREADS" . to_string ( ) , io_threads. to_string ( ) ) ;
26- let tp = currentprocess:: TestProcess {
27- vars,
28- ..Default :: default ( )
29- } ;
26+ let tp = TestProcess :: with_vars ( vars) ;
3027 currentprocess:: with ( tp. clone ( ) . into ( ) , || -> Result < ( ) > {
3128 let mut written = 0 ;
3229 let mut file_finished = false ;
@@ -97,10 +94,7 @@ fn test_complete_file(io_threads: &str) -> Result<()> {
9794 let work_dir = test_dir ( ) ?;
9895 let mut vars = HashMap :: new ( ) ;
9996 vars. insert ( "RUSTUP_IO_THREADS" . to_string ( ) , io_threads. to_string ( ) ) ;
100- let tp = currentprocess:: TestProcess {
101- vars,
102- ..Default :: default ( )
103- } ;
97+ let tp = TestProcess :: with_vars ( vars) ;
10498 currentprocess:: with ( tp. clone ( ) . into ( ) , || -> Result < ( ) > {
10599 let process = tp. clone ( ) . into ( ) ;
106100 let mut io_executor: Box < dyn Executor > = get_executor ( None , 32 * 1024 * 1024 , & process) ?;
0 commit comments