mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-09 21:29:06 -05:00
improvement: simplify config builder (clippy)
This commit is contained in:
parent
9124f4540a
commit
03a130b0b8
|
@ -158,9 +158,7 @@ impl Settings {
|
||||||
.add_source(Config::try_from(default)?)
|
.add_source(Config::try_from(default)?)
|
||||||
// override with file contents
|
// override with file contents
|
||||||
.add_source(File::with_name("config"))
|
.add_source(File::with_name("config"))
|
||||||
.build()?
|
.build()?;
|
||||||
.try_into()
|
|
||||||
.unwrap();
|
|
||||||
let mut settings: Settings = config.try_deserialize()?;
|
let mut settings: Settings = config.try_deserialize()?;
|
||||||
// ensure connection pool size is logical
|
// ensure connection pool size is logical
|
||||||
if settings.database.min_conn > settings.database.max_conn {
|
if settings.database.min_conn > settings.database.max_conn {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user