File tree 1 file changed +3
-3
lines changed
src/tools/build-manifest/src
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -205,13 +205,13 @@ fn main() {
205
205
//
206
206
// Once the old release process is fully decommissioned, the environment variable, all the
207
207
// related code in this tool and ./x.py dist hash-and-sign can be removed.
208
- let legacy = env:: var ( "BUILD_MANIFEST_LEGACY" ) . is_ok ( ) ;
208
+ let legacy = env:: var_os ( "BUILD_MANIFEST_LEGACY" ) . is_some ( ) ;
209
209
210
210
let num_threads = if legacy {
211
211
// Avoid overloading the old server in legacy mode.
212
212
1
213
- } else if let Ok ( num) = env:: var ( "BUILD_MANIFEST_NUM_THREADS" ) {
214
- num. parse ( ) . expect ( "invalid number for BUILD_MANIFEST_NUM_THREADS" )
213
+ } else if let Some ( num) = env:: var_os ( "BUILD_MANIFEST_NUM_THREADS" ) {
214
+ num. to_str ( ) . unwrap ( ) . parse ( ) . expect ( "invalid number for BUILD_MANIFEST_NUM_THREADS" )
215
215
} else {
216
216
num_cpus:: get ( )
217
217
} ;
You can’t perform that action at this time.
0 commit comments