fix: trim api_addr

This commit is contained in:
Orion Kindel 2023-07-13 09:59:19 -05:00
parent 4675329334
commit 757c35e20f
Signed by untrusted user who does not match committer: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -53,7 +53,7 @@ impl Env {
let api_addr = get("API_ADDR")?.unwrap_or("127.0.0.1:4444".into());
let api = Api { addr: api_addr.parse()
let api = Api { addr: api_addr.trim().parse()
.map_err(|e| Error::VarNotSocketAddr("API_ADDR".into(), e))? };
Ok(Env { postgres, api })