commit 03a130b0b8d79995c3b4b85da4a467316c72c4c2
parent 9124f4540a1604509e0fec9d95bc86ebab4b758d
Author: Greg Heartsfield <scsibug@imap.cc>
Date: Fri, 2 Sep 2022 10:18:16 -0500
improvement: simplify config builder (clippy)
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git 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 {