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:
		| @ -368,13 +368,10 @@ fn get_index( | ||||
|         "debug": debug, | ||||
|     }); | ||||
|  | ||||
|     let mut ct = "text/html"; | ||||
|  | ||||
|     let index = match api.render_template(template_file, &data) { | ||||
|         Ok(index) => index, | ||||
|     let (ct, index) = match api.render_template(template_file, &data) { | ||||
|         Ok(index) => ("text/html", index), | ||||
|         Err(err) => { | ||||
|             ct = "text/plain"; | ||||
|             format!("Error rendering template: {}", err) | ||||
|             ("text/plain", format!("Error rendering template: {}", err)) | ||||
|         } | ||||
|     }; | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user