File tree 3 files changed +6
-8
lines changed
3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
33
33
34
34
// We need to manually copy libstd to the extracted rustc sysroot
35
35
copy_directory (
36
- & libstd_dir. join ( "lib" ) . join ( "rustlib" ) . join ( & host_triple) . join ( "lib" ) ,
37
- & rustc_dir. join ( "lib" ) . join ( "rustlib" ) . join ( & host_triple) . join ( "lib" ) ,
36
+ & libstd_dir. join ( "lib" ) . join ( "rustlib" ) . join ( host_triple) . join ( "lib" ) ,
37
+ & rustc_dir. join ( "lib" ) . join ( "rustlib" ) . join ( host_triple) . join ( "lib" ) ,
38
38
) ?;
39
39
40
40
// Extract sources - they aren't in the `rustc-nightly-{host}` tarball, so we need to manually copy libstd
@@ -109,6 +109,6 @@ fn find_dist_version(directory: &Utf8Path) -> anyhow::Result<String> {
109
109
. unwrap ( )
110
110
. to_string ( ) ;
111
111
let ( version, _) =
112
- archive. strip_prefix ( "reproducible-artifacts-" ) . unwrap ( ) . split_once ( "-" ) . unwrap ( ) ;
112
+ archive. strip_prefix ( "reproducible-artifacts-" ) . unwrap ( ) . split_once ( '-' ) . unwrap ( ) ;
113
113
Ok ( version. to_string ( ) )
114
114
}
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ pub fn gather_llvm_bolt_profiles(env: &Environment) -> anyhow::Result<LlvmBoltPr
192
192
log:: info!( "Merging LLVM BOLT profiles to {merged_profile}" ) ;
193
193
194
194
let profiles: Vec < _ > =
195
- glob:: glob ( & format ! ( "{profile_root}*" ) ) ?. into_iter ( ) . collect :: < Result < Vec < _ > , _ > > ( ) ?;
195
+ glob:: glob ( & format ! ( "{profile_root}*" ) ) ?. collect :: < Result < Vec < _ > , _ > > ( ) ?;
196
196
197
197
let mut merge_args = vec ! [ "merge-fdata" ] ;
198
198
merge_args. extend ( profiles. iter ( ) . map ( |p| p. to_str ( ) . unwrap ( ) ) ) ;
Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ pub fn get_files_from_dir(
63
63
let path = format ! ( "{dir}/*{}" , suffix. unwrap_or( "" ) ) ;
64
64
65
65
Ok ( glob:: glob ( & path) ?
66
- . into_iter ( )
67
66
. map ( |p| p. map ( |p| Utf8PathBuf :: from_path_buf ( p) . unwrap ( ) ) )
68
67
. collect :: < Result < Vec < _ > , _ > > ( ) ?)
69
68
}
@@ -74,9 +73,8 @@ pub fn find_file_in_dir(
74
73
prefix : & str ,
75
74
suffix : & str ,
76
75
) -> anyhow:: Result < Utf8PathBuf > {
77
- let files = glob:: glob ( & format ! ( "{directory}/{prefix}*{suffix}" ) ) ?
78
- . into_iter ( )
79
- . collect :: < Result < Vec < _ > , _ > > ( ) ?;
76
+ let files =
77
+ glob:: glob ( & format ! ( "{directory}/{prefix}*{suffix}" ) ) ?. collect :: < Result < Vec < _ > , _ > > ( ) ?;
80
78
match files. len ( ) {
81
79
0 => Err ( anyhow:: anyhow!( "No file with prefix {prefix} found in {directory}" ) ) ,
82
80
1 => Ok ( Utf8PathBuf :: from_path_buf ( files[ 0 ] . clone ( ) ) . unwrap ( ) ) ,
You can’t perform that action at this time.
0 commit comments