diff options
| author | Fuwn <[email protected]> | 2024-06-03 15:23:14 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-03 15:23:14 -0700 |
| commit | 19010055c88fd7aac23f3ce39fa6a5ec1cbf9a52 (patch) | |
| tree | 22353b8c7a78b83c992b7bfb60c024fee6f78e3e /crates/whirl_config/src/lib.rs | |
| parent | chore(rustfmt): add new rules (diff) | |
| download | whirl-19010055c88fd7aac23f3ce39fa6a5ec1cbf9a52.tar.xz whirl-19010055c88fd7aac23f3ce39fa6a5ec1cbf9a52.zip | |
format: rustfmt with new rules
Diffstat (limited to 'crates/whirl_config/src/lib.rs')
| -rw-r--r-- | crates/whirl_config/src/lib.rs | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/crates/whirl_config/src/lib.rs b/crates/whirl_config/src/lib.rs index fbcdee2..3c9274d 100644 --- a/crates/whirl_config/src/lib.rs +++ b/crates/whirl_config/src/lib.rs @@ -19,22 +19,17 @@ html_favicon_url = "https://raw.githubusercontent.com/Whirlsplash/assets/master/Whirl.png" )] -#[macro_use] -extern crate serde_derive; -#[macro_use] -extern crate log; +#[macro_use] extern crate serde_derive; +#[macro_use] extern crate log; mod structures; -use config::{ConfigError, File}; - -use crate::structures::{ - DistributorConfig, - HubConfig, - WhirlsplashApiConfig, - WhirlsplashConfig, - WhirlsplashLogConfig, - WhirlsplashPromptConfig, +use { + crate::structures::{ + DistributorConfig, HubConfig, WhirlsplashApiConfig, WhirlsplashConfig, + WhirlsplashLogConfig, WhirlsplashPromptConfig, + }, + config::{ConfigError, File}, }; #[derive(Serialize, Deserialize, Debug)] @@ -49,10 +44,9 @@ impl Config { /// /// # Panics /// - May panic if the configuration is unable to be refreshed. - #[deprecated( - note = "the current implementation of the configurations system automatically performs \ - refreshes, this method has no effects" - )] + #[deprecated(note = "the current implementation of the configurations \ + system automatically performs refreshes, this method \ + has no effects")] pub fn refresh() { let _ = config::Config::new().refresh().unwrap(); } fn load() -> Result<Self, ConfigError> { @@ -74,7 +68,8 @@ impl Config { why ); warn!( - "you should probably generate yourself a configuration file with `whirl config generate`!" + "you should probably generate yourself a configuration file with \ + `whirl config generate`!" ); Self::default() @@ -90,9 +85,7 @@ impl Default for Config { whirlsplash: WhirlsplashConfig { worldsmaster_username: "WORLDSMASTER".to_string(), ip: "127.0.0.1".to_string(), - api: WhirlsplashApiConfig { - port: 80 - }, + api: WhirlsplashApiConfig { port: 80 }, prompt: WhirlsplashPromptConfig { enable: false, ps1: "[WORLDSMASTER@Whirlsplash ~]$".to_string(), @@ -109,9 +102,7 @@ impl Default for Config { worldsmaster_greeting: "Welcome to Whirlsplash!".to_string(), port: 6650, }, - hub: HubConfig { - port: 5673 - }, + hub: HubConfig { port: 5673 }, } } } |