@@ -8,17 +8,14 @@ use crate::valgrind_log::ValgrindLog;
88use lazy_static:: lazy_static;
99use regex:: Regex ;
1010use std:: collections:: HashMap ;
11- use std:: ffi:: OsStr ;
1211use std:: fs:: File ;
13- use std:: io;
14- use std:: io:: { BufRead , BufReader , Read , Seek } ;
15- use std:: path:: { Path , PathBuf } ;
12+ use std:: io:: { self , BufRead , BufReader , Read } ;
13+ use std:: path:: Path ;
1614use std:: time:: Duration ;
1715use tmc_langs_framework:: {
1816 command:: TmcCommand ,
1917 domain:: { ExerciseDesc , RunResult , RunStatus , TestDesc , TmcProjectYml } ,
2018 plugin:: LanguagePlugin ,
21- zip:: ZipArchive ,
2219 TmcError ,
2320} ;
2421
@@ -278,6 +275,7 @@ mod test {
278275 use super :: * ;
279276 use std:: path:: PathBuf ;
280277 use tempfile:: { tempdir, TempDir } ;
278+ use tmc_langs_framework:: zip:: ZipArchive ;
281279
282280 fn init ( ) {
283281 let _ = env_logger:: builder ( ) . is_test ( true ) . try_init ( ) ;
@@ -296,9 +294,9 @@ mod test {
296294 . skip ( path. components ( ) . count ( ) )
297295 . collect ( ) ;
298296 let temp_path = temp. path ( ) . join ( entry_path) ;
299- temp_path
300- . parent ( )
301- . map ( |p| std :: fs :: create_dir_all ( & p ) . unwrap ( ) ) ;
297+ if let Some ( parent ) = temp_path. parent ( ) {
298+ std :: fs :: create_dir_all ( parent) . unwrap ( ) ;
299+ }
302300 log:: trace!( "copying {:?} -> {:?}" , entry. path( ) , temp_path) ;
303301 std:: fs:: copy ( entry. path ( ) , temp_path) . unwrap ( ) ;
304302 }
0 commit comments