@@ -15,21 +15,18 @@ use run_make_support::{dynamic_lib, rustc, tmp_dir};
1515use std:: fs;
1616
1717fn main ( ) {
18- let mut tmp_dir_other = tmp_dir ( ) ;
19- tmp_dir_other. push ( "other" ) ;
18+ let tmp_dir_other = tmp_dir ( ) . join ( "other" ) ;
2019
21- fs:: create_dir ( tmp_dir_other. clone ( ) ) ;
20+ fs:: create_dir ( & tmp_dir_other) ;
2221 rustc ( ) . input ( "foo.rs" ) . crate_type ( "dylib" ) . codegen_option ( "prefer-dynamic" ) . run ( ) ;
23- fs:: rename ( dynamic_lib ( "foo" ) , tmp_dir_other. clone ( ) ) ;
22+ fs:: rename ( dynamic_lib ( "foo" ) , & tmp_dir_other) ;
2423 rustc ( ) . input ( "foo.rs" ) . crate_type ( "dylib" ) . codegen_option ( "prefer-dynamic" ) . run ( ) ;
25- rustc ( ) . input ( "bar.rs" ) . library_search_path ( tmp_dir_other. clone ( ) ) . run ( ) ;
24+ rustc ( ) . input ( "bar.rs" ) . library_search_path ( & tmp_dir_other) . run ( ) ;
2625 fs:: remove_dir_all ( tmp_dir ( ) ) ;
2726
28- fs:: create_dir_all ( tmp_dir_other. clone ( ) ) ;
27+ fs:: create_dir_all ( & tmp_dir_other) ;
2928 rustc ( ) . input ( "foo.rs" ) . crate_type ( "rlib" ) . run ( ) ;
30- let mut tmp_dir_libfoo = tmp_dir ( ) ;
31- tmp_dir_libfoo. push ( "libfoo.rlib" ) ;
32- fs:: rename ( tmp_dir_libfoo, tmp_dir_other. clone ( ) ) ;
29+ fs:: rename ( tmp_dir ( ) . join ( "libfoo.rlib" ) , & tmp_dir_other) ;
3330 rustc ( ) . input ( "foo.rs" ) . crate_type ( "rlib" ) . run ( ) ;
34- rustc ( ) . input ( "bar.rs" ) . library_search_path ( tmp_dir_other. clone ( ) ) . run ( ) ;
31+ rustc ( ) . input ( "bar.rs" ) . library_search_path ( tmp_dir_other) . run ( ) ;
3532}
0 commit comments