From 633c99c860db879673379bd8a2b391c735907b7b Mon Sep 17 00:00:00 2001 From: Adam Reese Date: Fri, 10 Sep 2021 11:33:52 -0700 Subject: [PATCH] Don't require a value passed for the --use-embedded-db --- bin/server.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/server.rs b/bin/server.rs index 6936541..623be78 100644 --- a/bin/server.rs +++ b/bin/server.rs @@ -101,7 +101,8 @@ struct Opts { env = "BINDLE_USE_EMBEDDED_DB", about = "Use the new embedded database provider. This is currently experimental, but fairly stable and more efficient. In the future, this will be the default" )] - use_embedded_db: Option, + #[serde(default)] + use_embedded_db: bool, #[clap( name = "htpasswd-file", @@ -281,8 +282,7 @@ async fn main() -> anyhow::Result<()> { // similar issues (though I think it could be fixed, it would be a lot of code). So we might // have to resort to some sort of dependency injection here. The same goes for providers as the // methods have generic parameters - let use_embedded_db = opts.use_embedded_db.unwrap_or_default(); - match (use_embedded_db, auth_method) { + match (opts.use_embedded_db, auth_method) { // Embedded DB and oidc auth (true, AuthType::Oidc(client_id, issuer, token_url)) => { warn!("Using EmbeddedProvider. This is currently experimental");