summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorRyan Leckey <ryan@launchbadge.com>2017-01-27 11:14:28 -0800
committerRyan Leckey <ryan@launchbadge.com>2017-01-27 11:15:21 -0800
commitf3b6fd435478a129dbf6ede37d8881c7a55efc42 (patch)
tree9e9e3eb6be09f6a80d9ed7d49781a1d9afb4b380 /src/lib.rs
parent3af8fb895f002c8e1a3728d64bfe901b3cab3dfc (diff)
Move 'Envrionment' into its own source
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 99a6da3..0fa3d70 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -10,6 +10,7 @@ extern crate serde_json;
mod value;
mod source;
mod file;
+mod env;
mod config;
use std::error::Error;
@@ -17,6 +18,7 @@ use std::sync::{Once, ONCE_INIT};
pub use source::{Source, SourceBuilder};
pub use file::{File, FileFormat};
+pub use env::Environment;
pub use value::Value;
@@ -29,9 +31,7 @@ static CONFIG_INIT: Once = ONCE_INIT;
// Get the global configuration instance
fn global() -> &'static mut Config {
unsafe {
- CONFIG_INIT.call_once(|| {
- CONFIG = Some(Default::default());
- });
+ CONFIG_INIT.call_once(|| { CONFIG = Some(Default::default()); });
CONFIG.as_mut().unwrap()
}
@@ -43,10 +43,6 @@ pub fn merge<T>(source: T) -> Result<(), Box<Error>>
global().merge(source)
}
-pub fn set_env_prefix(prefix: &str) {
- global().set_env_prefix(prefix)
-}
-
pub fn set_default<T>(key: &str, value: T)
where T: Into<Value>
{