diff options
author | Ryan Leckey <leckey.ryan@gmail.com> | 2017-01-26 00:09:41 -0800 |
---|---|---|
committer | Ryan Leckey <leckey.ryan@gmail.com> | 2017-01-26 00:09:41 -0800 |
commit | a6fb2f92dc8d53660c1d2d066f146ef261052330 (patch) | |
tree | d66d90b8e563f0df6bee8563847ba9e67edfa9b7 /src/lib.rs | |
parent | 7c696e6b457debb0faca4fdb0d55e3ed43773484 (diff) |
Add some examples
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -5,6 +5,7 @@ extern crate toml; mod value; mod source; +mod file; mod config; use std::error::Error; @@ -12,7 +13,7 @@ use std::borrow::Cow; use std::sync::{Once, ONCE_INIT}; pub use source::Source; -pub use source::File; +pub use file::File; pub use value::Value; @@ -25,9 +26,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() } |