@@ -105,40 +105,38 @@ fn check(
105105 // Ensure that the generated project builds without errors:
106106 let output = Command :: new ( "cargo" )
107107 . args ( [ if build { "build" } else { "check" } ] )
108+ . env_remove ( "RUSTUP_TOOLCHAIN" )
108109 . current_dir ( project_path. join ( PROJECT_NAME ) )
109110 . stdout ( Stdio :: inherit ( ) )
110111 . stderr ( Stdio :: inherit ( ) )
111112 . output ( ) ?;
112113 if !output. status . success ( ) {
113- project_dir. close ( ) ?;
114114 bail ! ( "Failed to execute cargo check subcommand" )
115115 }
116116
117117 // Run clippy against the generated project to check for lint errors:
118118 let output = Command :: new ( "cargo" )
119119 . args ( [ "clippy" , "--no-deps" , "--" , "-Dwarnings" ] )
120+ . env_remove ( "RUSTUP_TOOLCHAIN" )
120121 . current_dir ( project_path. join ( PROJECT_NAME ) )
121122 . stdout ( Stdio :: inherit ( ) )
122123 . stderr ( Stdio :: inherit ( ) )
123124 . output ( ) ?;
124125 if !output. status . success ( ) {
125- project_dir. close ( ) ?;
126126 bail ! ( "Failed to execute cargo clippy subcommand" )
127127 }
128128
129129 // Ensure that the generated project is correctly formatted:
130130 let output = Command :: new ( "cargo" )
131131 . args ( [ "fmt" , "--" , "--check" ] )
132+ . env_remove ( "RUSTUP_TOOLCHAIN" )
132133 . current_dir ( project_path. join ( PROJECT_NAME ) )
133134 . stdout ( Stdio :: inherit ( ) )
134135 . stderr ( Stdio :: inherit ( ) )
135136 . output ( ) ?;
136137 if !output. status . success ( ) {
137- project_dir. close ( ) ?;
138138 bail ! ( "Failed to execute cargo fmt subcommand" )
139139 }
140-
141- project_dir. close ( ) ?;
142140 }
143141
144142 Ok ( ( ) )
@@ -226,7 +224,7 @@ fn options_for_chip(chip: Chip, all_combinations: bool) -> Result<Vec<Vec<String
226224 }
227225
228226 // A list of each option, along with its dependencies
229- let mut available_options = vec ! [ ] ;
227+ let mut available_options = vec ! [ vec! [ ] ] ;
230228
231229 for option in all_options {
232230 let option = find_option ( & option, & template. options ) . unwrap ( ) ;
@@ -247,7 +245,6 @@ fn options_for_chip(chip: Chip, all_combinations: bool) -> Result<Vec<Vec<String
247245 available_options. dedup ( ) ;
248246
249247 if !all_combinations {
250- available_options. push ( vec ! [ ] ) ;
251248 return Ok ( available_options) ;
252249 }
253250
0 commit comments