diff options
| author | Fuwn <[email protected]> | 2021-05-23 13:51:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-23 13:51:20 -0700 |
| commit | ddce4052e84962b10ee18a3d395ba5f8edeb3fff (patch) | |
| tree | 7c57e6aa0fd346e540d974e08a099180739afa40 /crates/whirl_config/src | |
| parent | build(cargo): create a fast builds configuration for cargo (diff) | |
| download | whirl-ddce4052e84962b10ee18a3d395ba5f8edeb3fff.tar.xz whirl-ddce4052e84962b10ee18a3d395ba5f8edeb3fff.zip | |
docs(global): add new documentation
Diffstat (limited to 'crates/whirl_config/src')
| -rw-r--r-- | crates/whirl_config/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/whirl_config/src/lib.rs b/crates/whirl_config/src/lib.rs index 8f312cd..66d3a26 100644 --- a/crates/whirl_config/src/lib.rs +++ b/crates/whirl_config/src/lib.rs @@ -36,6 +36,7 @@ pub struct Config { pub hub: HubConfig, } impl Config { + /// Re-fetch the configuration from the configuration file. pub fn refresh() { let _ = config::Config::new().refresh(); } fn load() -> Result<Self, ConfigError> { @@ -45,6 +46,7 @@ impl Config { s.try_into() } + // Get a certain configuration key or group from the configuration file. pub fn get() -> Config { return if let Err(why) = Self::load() { error!( |