aboutsummaryrefslogtreecommitdiff
path: root/src/config/options.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-25 19:19:19 +0100
committerAlex Auvolat <alex@adnab.me>2021-12-25 19:23:18 +0100
commit3b9e75634aa06b6df0519e5d44fd6e5281712d09 (patch)
treed82e14884993895a13cdca78c7388de2e0846f0f /src/config/options.rs
parent4d4d453afa3edafe71db2ae60171b8696b38a3c9 (diff)
downloaddiplonat-3b9e75634aa06b6df0519e5d44fd6e5281712d09.tar.gz
diplonat-3b9e75634aa06b6df0519e5d44fd6e5281712d09.zip
Allow Diplonat to automatically detect it's private IP
Diffstat (limited to 'src/config/options.rs')
-rw-r--r--src/config/options.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config/options.rs b/src/config/options.rs
index b8dccf7..f62d14c 100644
--- a/src/config/options.rs
+++ b/src/config/options.rs
@@ -62,7 +62,9 @@ impl ConfigOpts {
// Currently only used in tests
#[allow(dead_code)]
pub fn from_iter<Iter: Clone>(iter: Iter) -> Result<RuntimeConfig>
- where Iter: IntoIterator<Item = (String, String)> {
+ where
+ Iter: IntoIterator<Item = (String, String)>,
+ {
let base: ConfigOptsBase = envy::prefixed("DIPLONAT_").from_iter(iter.clone())?;
let consul: ConfigOptsConsul = envy::prefixed("DIPLONAT_CONSUL_").from_iter(iter.clone())?;
let acme: ConfigOptsAcme = envy::prefixed("DIPLONAT_ACME_").from_iter(iter.clone())?;