We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df82298 commit 84829cdCopy full SHA for 84829cd
src/web/rustdoc.rs
@@ -78,10 +78,11 @@ impl RustLangRedirector {
78
impl iron::Handler for RustLangRedirector {
79
fn handle(&self, _req: &mut Request) -> IronResult<Response> {
80
let url = url::Url::parse("https://doc.rust-lang.org/stable/")
81
- .unwrap()
+ .expect("failed to parse rust-lang.org base URL")
82
.join(self.target)
83
- .unwrap();
84
- let url = Url::from_generic_url(url).unwrap();
+ .expect("failed to append crate name to rust-lang.org base URL");
+ let url = Url::from_generic_url(url)
85
+ .expect("failed to convert url::Url to iron::Url");
86
Ok(Response::with((status::Found, Redirect(url))))
87
}
88
0 commit comments