aboutsummaryrefslogtreecommitdiff
path: root/src/forms.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/forms.rs')
-rw-r--r--src/forms.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/forms.rs b/src/forms.rs
index c827ccb..15a22cf 100644
--- a/src/forms.rs
+++ b/src/forms.rs
@@ -35,7 +35,8 @@ pub fn edit_text_form<'a, C: Controller>(
header: data
.oid
.is_some()
- .then(|| action_links("edit", controller, ctx, parts)),
+ .then(|| action_links("edit", controller, ctx, parts))
+ .unwrap_or_default(),
scripts: vec![include_str!("static/edit_script.js")],
script_src: vec![include_str!("static/edit_script.js.sha")],
..Default::default()
@@ -91,7 +92,7 @@ pub fn move_form<C: Controller>(
) -> Result<Response, Error> {
let mut page = Page {
title: format!("Move {}", filename),
- header: Some(action_links("move", controller, ctx, parts)),
+ header: action_links("move", controller, ctx, parts),
..Default::default()
};
@@ -127,7 +128,9 @@ pub fn upload_form<'a, C: Controller>(
<button>Upload</button>\
</form>"
.into(),
- header: file_exists.then(|| action_links("edit", controller, &ctx, parts)),
+ header: file_exists
+ .then(|| action_links("edit", controller, &ctx, parts))
+ .unwrap_or_default(),
..Default::default()
}
}