Reformats Code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use std::env;
|
||||
use cached::proc_macro::cached;
|
||||
use std::env;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct ConfigServer {
|
||||
@@ -9,14 +9,12 @@ pub struct ConfigServer {
|
||||
|
||||
#[cached]
|
||||
pub fn get_config_server() -> ConfigServer {
|
||||
let h = option_env!("HOST")
|
||||
.unwrap_or("localhost").to_string();
|
||||
let h = option_env!("HOST").unwrap_or("localhost").to_string();
|
||||
|
||||
let p = option_env!("PORT").unwrap_or("8500")
|
||||
.parse::<u16>().unwrap();
|
||||
let p = option_env!("PORT")
|
||||
.unwrap_or("8500")
|
||||
.parse::<u16>()
|
||||
.unwrap();
|
||||
|
||||
ConfigServer {
|
||||
host: h,
|
||||
port: p,
|
||||
}
|
||||
}
|
||||
ConfigServer { host: h, port: p }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user