@@ -86,12 +86,8 @@ impl Generator {
8686
8787 // Write the installer version (only used by combine-installers.sh)
8888 let version = package_dir. join ( "rust-installer-version" ) ;
89- writeln ! (
90- create_new_file( version) ?,
91- "{}" ,
92- crate :: RUST_INSTALLER_VERSION
93- )
94- . context ( "failed to write new installer version" ) ?;
89+ writeln ! ( create_new_file( version) ?, "{}" , crate :: RUST_INSTALLER_VERSION )
90+ . context ( "failed to write new installer version" ) ?;
9591
9692 // Copy the overlay
9793 if !self . non_installed_overlay . is_empty ( ) {
@@ -128,33 +124,19 @@ impl Generator {
128124/// Copies the `src` directory recursively to `dst`, writing `manifest.in` too.
129125fn copy_and_manifest ( src : & Path , dst : & Path , bulk_dirs : & str ) -> Result < ( ) > {
130126 let mut manifest = create_new_file ( dst. join ( "manifest.in" ) ) ?;
131- let bulk_dirs: Vec < _ > = bulk_dirs
132- . split ( ',' )
133- . filter ( |s| !s. is_empty ( ) )
134- . map ( Path :: new)
135- . collect ( ) ;
127+ let bulk_dirs: Vec < _ > = bulk_dirs. split ( ',' ) . filter ( |s| !s. is_empty ( ) ) . map ( Path :: new) . collect ( ) ;
136128
137129 let mut paths = BTreeSet :: new ( ) ;
138130 copy_with_callback ( src, dst, |path, file_type| {
139131 // We need paths to be compatible with both Unix and Windows.
140- if path
141- . components ( )
142- . filter_map ( |c| c. as_os_str ( ) . to_str ( ) )
143- . any ( |s| s. contains ( '\\' ) )
144- {
145- bail ! (
146- "rust-installer doesn't support '\\ ' in path components: {:?}" ,
147- path
148- ) ;
132+ if path. components ( ) . filter_map ( |c| c. as_os_str ( ) . to_str ( ) ) . any ( |s| s. contains ( '\\' ) ) {
133+ bail ! ( "rust-installer doesn't support '\\ ' in path components: {:?}" , path) ;
149134 }
150135
151136 // Normalize to Unix-style path separators.
152137 let normalized_string;
153138 let mut string = path. to_str ( ) . ok_or_else ( || {
154- format_err ! (
155- "rust-installer doesn't support non-Unicode paths: {:?}" ,
156- path
157- )
139+ format_err ! ( "rust-installer doesn't support non-Unicode paths: {:?}" , path)
158140 } ) ?;
159141 if string. contains ( '\\' ) {
160142 normalized_string = string. replace ( '\\' , "/" ) ;
0 commit comments