File tree 1 file changed +3
-5
lines changed
src/tools/build-manifest/src
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 4
4
//! via `x.py dist hash-and-sign`; the cmdline arguments are set up
5
5
//! by rustbuild (in `src/bootstrap/dist.rs`).
6
6
7
- #![ feature( try_blocks) ]
8
7
#![ deny( warnings) ]
9
8
10
9
use toml;
@@ -381,10 +380,9 @@ impl Builder {
381
380
/// If a tool does not pass its tests, don't ship it.
382
381
/// Right now, we do this only for Miri.
383
382
fn check_toolstate ( & mut self ) {
384
- let toolstates: Option < HashMap < String , String > > = try {
385
- let toolstates = File :: open ( self . input . join ( "toolstates-linux.json" ) ) . ok ( ) ?;
386
- serde_json:: from_reader ( & toolstates) . ok ( ) ?
387
- } ;
383
+ let toolstates: Option < HashMap < String , String > > =
384
+ File :: open ( self . input . join ( "toolstates-linux.json" ) ) . ok ( )
385
+ . and_then ( |f| serde_json:: from_reader ( & f) . ok ( ) ) ;
388
386
let toolstates = toolstates. unwrap_or_else ( || {
389
387
println ! ( "WARNING: `toolstates-linux.json` missing; assuming all tools failed" ) ;
390
388
HashMap :: default ( ) // Use empty map if anything went wrong.
You can’t perform that action at this time.
0 commit comments