Skip to content

Commit dceee29

Browse files
committed
Revert "Merge pull request #519 from jyn514/panic-source"
This reverts commit e0f7294, reversing changes made to 1de587d.
1 parent e0f7294 commit dceee29

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/web/source.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl FileList {
104104
return None;
105105
}
106106

107-
let files: Json = rows.get(0).get_opt(5).unwrap().ok()?;
107+
let files: Json = rows.get(0).get(5);
108108

109109
let mut file_list: Vec<File> = Vec::new();
110110

@@ -181,8 +181,6 @@ impl FileList {
181181

182182

183183
pub fn source_browser_handler(req: &mut Request) -> IronResult<Response> {
184-
use iron::status;
185-
use super::error::Nope;
186184
let router = extension!(req, Router);
187185
let name = cexpect!(router.find("name"));
188186
let version = cexpect!(router.find("version"));
@@ -248,6 +246,6 @@ pub fn source_browser_handler(req: &mut Request) -> IronResult<Response> {
248246
.set_bool("file_content_rust_source", is_rust_source)
249247
.to_resp("source")
250248
} else {
251-
Err(IronError::new(Nope::NoResults, status::NotFound))
249+
page.to_resp("source")
252250
}
253251
}

0 commit comments

Comments
 (0)