improvement: simplify config builder (clippy)

This commit is contained in:
Greg Heartsfield 2022-09-02 10:18:16 -05:00
parent 9124f4540a
commit 03a130b0b8

View File

@ -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 {