refactor: explicit bool literals for --directory-listing and --http2
since via structopt is "not possible" to use optional boolean values
we want consistency for all bool flags (e.g --flag=true|false)
Diff
src/config.rs | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
@@ -56,7 +56,13 @@ pub struct Config {
pub cors_allow_origins: String,
#[structopt(long, short = "t", env = "SERVER_HTTP2_TLS")]
#[structopt(
long,
short = "t",
parse(try_from_str),
default_value = "false",
env = "SERVER_HTTP2_TLS"
)]
pub http2: bool,
@@ -72,6 +78,7 @@ pub struct Config {
long,
short = "z",
parse(try_from_str),
default_value = "false",
env = "SERVER_DIRECTORY_LISTING"
)]