aboutsummaryrefslogtreecommitdiff
path: root/src/controller.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/controller.rs')
-rw-r--r--src/controller.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/controller.rs b/src/controller.rs
index f912d74..168bc76 100644
--- a/src/controller.rs
+++ b/src/controller.rs
@@ -286,8 +286,7 @@ fn multi_user_startpage(
// TODO: add domain name to title?
let mut page = Page {
title: "GitPad".into(),
- body: String::new(),
- header: None,
+ ..Default::default()
};
let branches: Vec<_> = repo.branches(Some(BranchType::Local))?.collect();
@@ -354,12 +353,7 @@ impl Controller for MultiUserController {
if unsanitized_path.is_empty() {
let username = username_from_parts(&parts).unwrap();
if username != rev.0 {
- let mut page = Page {
- title: "".into(),
- header: None,
- body: String::new(),
- };
-
+ let mut page = Page::default();
self.list_shares(repo, &rev, username, &mut page.body);
return Err(Ok(page.into()));
}