aboutsummaryrefslogtreecommitdiff
path: root/src/get_routes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/get_routes.rs')
-rw-r--r--src/get_routes.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/get_routes.rs b/src/get_routes.rs
index 112cf6b..79b7cb5 100644
--- a/src/get_routes.rs
+++ b/src/get_routes.rs
@@ -438,7 +438,7 @@ fn remove_blob<C: Controller>(
}
pub fn view_tree<C: Controller>(
- tree: Result<Tree, git2::Error>,
+ tree: Option<Tree>,
controller: &C,
ctx: &Context,
parts: &Parts,
@@ -454,7 +454,7 @@ pub fn view_tree<C: Controller>(
.push_str("<li><a href='..' title='go to parent directory'>../</a></li>");
}
- if let Ok(tree) = &tree {
+ if let Some(tree) = &tree {
let mut entries: Vec<_> = tree.iter().collect();
entries.sort_by_key(|a| a.kind().unwrap().raw());
@@ -477,7 +477,7 @@ pub fn view_tree<C: Controller>(
}
page.body.push_str("</ul>");
- controller.before_return_tree_page(&mut page, tree.ok(), ctx, parts);
+ controller.before_return_tree_page(&mut page, tree, ctx, parts);
Ok(page.into())
}