Use question_mark feature in linkchecker.
This commit is contained in:
parent
4812cf392f
commit
f1c6cad963
@ -24,6 +24,8 @@
|
||||
//! A few whitelisted exceptions are allowed as there's known bugs in rustdoc,
|
||||
//! but this should catch the majority of "broken link" cases.
|
||||
|
||||
#![feature(question_mark)]
|
||||
|
||||
extern crate url;
|
||||
|
||||
use std::env;
|
||||
@ -243,15 +245,14 @@ fn load_file(cache: &mut Cache,
|
||||
None
|
||||
}
|
||||
Entry::Vacant(entry) => {
|
||||
let mut fp = try!(File::open(file.clone()).map_err(|err| {
|
||||
let mut fp = File::open(file.clone()).map_err(|err| {
|
||||
if let FromRedirect(true) = redirect {
|
||||
LoadError::BrokenRedirect(file.clone(), err)
|
||||
} else {
|
||||
LoadError::IOError(err)
|
||||
}
|
||||
}));
|
||||
try!(fp.read_to_string(&mut contents)
|
||||
.map_err(|err| LoadError::IOError(err)));
|
||||
})?;
|
||||
fp.read_to_string(&mut contents).map_err(|err| LoadError::IOError(err))?;
|
||||
|
||||
let maybe = maybe_redirect(&contents);
|
||||
if maybe.is_some() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user