File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 24
24
//! A few whitelisted exceptions are allowed as there's known bugs in rustdoc,
25
25
//! but this should catch the majority of "broken link" cases.
26
26
27
+ #![ feature( question_mark) ]
28
+
27
29
extern crate url;
28
30
29
31
use std:: env;
@@ -243,15 +245,14 @@ fn load_file(cache: &mut Cache,
243
245
None
244
246
}
245
247
Entry :: Vacant ( entry) => {
246
- let mut fp = try! ( File :: open ( file. clone ( ) ) . map_err ( |err| {
248
+ let mut fp = File :: open ( file. clone ( ) ) . map_err ( |err| {
247
249
if let FromRedirect ( true ) = redirect {
248
250
LoadError :: BrokenRedirect ( file. clone ( ) , err)
249
251
} else {
250
252
LoadError :: IOError ( err)
251
253
}
252
- } ) ) ;
253
- try!( fp. read_to_string ( & mut contents)
254
- . map_err ( |err| LoadError :: IOError ( err) ) ) ;
254
+ } ) ?;
255
+ fp. read_to_string ( & mut contents) . map_err ( |err| LoadError :: IOError ( err) ) ?;
255
256
256
257
let maybe = maybe_redirect ( & contents) ;
257
258
if maybe. is_some ( ) {
You can’t perform that action at this time.
0 commit comments