File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1090,7 +1090,8 @@ mod tests {
10901090
10911091 /// Run the clone command with the specified contract address and assert the compilation.
10921092 async fn one_test_case ( address : Address , check_compilation_result : bool ) {
1093- let mut project_root = tempfile:: tempdir ( ) . unwrap ( ) . path ( ) . to_path_buf ( ) ;
1093+ let temp_dir = tempfile:: tempdir ( ) . unwrap ( ) ;
1094+ let mut project_root = temp_dir. path ( ) . to_path_buf ( ) ;
10941095 let client = mock_etherscan ( address) ;
10951096 let meta = CloneArgs :: collect_metadata_from_client ( address, & client) . await . unwrap ( ) ;
10961097 CloneArgs :: init_an_empty_project ( & project_root, DependencyInstallOpts :: default ( ) )
@@ -1115,7 +1116,6 @@ mod tests {
11151116 pick_creation_info ( & address. to_string ( ) ) . expect ( "creation code not found" ) ;
11161117 assert_compilation_result ( rv, contract_name, stripped_creation_code) ;
11171118 }
1118- std:: fs:: remove_dir_all ( project_root) . unwrap ( ) ;
11191119 }
11201120
11211121 #[ tokio:: test( flavor = "multi_thread" ) ]
You can’t perform that action at this time.
0 commit comments