aboutsummaryrefslogtreecommitdiffstats
path: root/src/renderer.rs
diff options
context:
space:
mode:
authorboasting-squirrel <boasting.squirrel@gmail.com>2019-04-07 11:15:48 +0000
committerboasting-squirrel <boasting.squirrel@gmail.com>2019-04-07 11:15:48 +0000
commit2d717e4d0e78bd2132886a3339804f05f816f67a (patch)
tree35565ca622bfc87e72b69ed62a0f4dc914a697ba /src/renderer.rs
parentUse strum_macros::EnumIter instead of manually listing Enum variants (diff)
downloadminiserve-2d717e4d0e78bd2132886a3339804f05f816f67a.tar.gz
miniserve-2d717e4d0e78bd2132886a3339804f05f816f67a.zip
Use strum on Enums to reduce boilerplate
Diffstat (limited to '')
-rw-r--r--src/renderer.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index 1371ab6..909ee75 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -141,7 +141,7 @@ fn color_scheme_link(
/// Partial: archive button
fn archive_button(compress_method: archive::CompressionMethod) -> Markup {
- let link = format!("?download={}", compress_method.to_string());
+ let link = format!("?download={}", compress_method);
let text = format!("Download .{}", compress_method.extension());
html! {
@@ -163,8 +163,8 @@ fn parametrized_link(
return format!(
"{}?sort={}&order={}&theme={}",
link,
- method.to_string(),
- order.to_string(),
+ method,
+ order,
color_scheme.to_string()
);
}