File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/tools/build-manifest/src Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 44//! via `x.py dist hash-and-sign`; the cmdline arguments are set up
55//! by rustbuild (in `src/bootstrap/dist.rs`).
66
7- #![ feature( try_blocks) ]
87#![ deny( warnings) ]
98
109use toml;
@@ -381,10 +380,9 @@ impl Builder {
381380 /// If a tool does not pass its tests, don't ship it.
382381 /// Right now, we do this only for Miri.
383382 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 ( ) ) ;
388386 let toolstates = toolstates. unwrap_or_else ( || {
389387 println ! ( "WARNING: `toolstates-linux.json` missing; assuming all tools failed" ) ;
390388 HashMap :: default ( ) // Use empty map if anything went wrong.
You can’t perform that action at this time.
0 commit comments