server: get index: make content-type non mutable
feels more idiomatic Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
07995a3ca3
commit
adfcfb6788
|
@ -368,13 +368,10 @@ fn get_index(
|
||||||
"debug": debug,
|
"debug": debug,
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut ct = "text/html";
|
let (ct, index) = match api.render_template(template_file, &data) {
|
||||||
|
Ok(index) => ("text/html", index),
|
||||||
let index = match api.render_template(template_file, &data) {
|
|
||||||
Ok(index) => index,
|
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
ct = "text/plain";
|
("text/plain", format!("Error rendering template: {}", err))
|
||||||
format!("Error rendering template: {}", err)
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue