@@ -86,12 +86,8 @@ impl Generator {
86
86
87
87
// Write the installer version (only used by combine-installers.sh)
88
88
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" ) ?;
95
91
96
92
// Copy the overlay
97
93
if !self . non_installed_overlay . is_empty ( ) {
@@ -128,33 +124,19 @@ impl Generator {
128
124
/// Copies the `src` directory recursively to `dst`, writing `manifest.in` too.
129
125
fn copy_and_manifest ( src : & Path , dst : & Path , bulk_dirs : & str ) -> Result < ( ) > {
130
126
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 ( ) ;
136
128
137
129
let mut paths = BTreeSet :: new ( ) ;
138
130
copy_with_callback ( src, dst, |path, file_type| {
139
131
// 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) ;
149
134
}
150
135
151
136
// Normalize to Unix-style path separators.
152
137
let normalized_string;
153
138
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)
158
140
} ) ?;
159
141
if string. contains ( '\\' ) {
160
142
normalized_string = string. replace ( '\\' , "/" ) ;
0 commit comments