From 03a130b0b8d79995c3b4b85da4a467316c72c4c2 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Fri, 2 Sep 2022 10:18:16 -0500 Subject: [PATCH] improvement: simplify config builder (clippy) --- src/config.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/config.rs b/src/config.rs index ba60c5b..09add90 100644 --- a/src/config.rs +++ b/src/config.rs @@ -158,9 +158,7 @@ impl Settings { .add_source(Config::try_from(default)?) // override with file contents .add_source(File::with_name("config")) - .build()? - .try_into() - .unwrap(); + .build()?; let mut settings: Settings = config.try_deserialize()?; // ensure connection pool size is logical if settings.database.min_conn > settings.database.max_conn {