diff --git a/src/conf.rs b/src/conf.rs index 689926b..ecbb1c3 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -1,5 +1,5 @@ -use std::env; use jsonwebtoken::{DecodingKey, EncodingKey}; +use std::env; /// Central repository for the backend's config. pub struct Config { @@ -13,7 +13,11 @@ pub struct Config { impl Config { pub fn from_env() -> Config { - let jwt_secret = parse_sha256(env::var("JWT_SECRET").expect("JWT_SECRET must be a 32-byte base-16 string").as_str()); + let jwt_secret = parse_sha256( + env::var("JWT_SECRET") + .expect("JWT_SECRET must be a 32-byte base-16 string") + .as_str(), + ); Config { bind_addr: env::var("BIND_ADDR").unwrap_or("localhost".into()), bind_port: env::var("BIND_PORT")