Update format

This commit is contained in:
Kevin Yue
2024-01-28 05:11:46 -05:00
parent b2bb35994f
commit 196e91289c
24 changed files with 54 additions and 206 deletions

View File

@@ -30,9 +30,7 @@ pub fn normalize_server(server: &str) -> anyhow::Result<String> {
.host_str()
.ok_or(anyhow::anyhow!("Invalid server URL: missing host"))?;
let port: String = normalized_url
.port()
.map_or("".into(), |port| format!(":{}", port));
let port: String = normalized_url.port().map_or("".into(), |port| format!(":{}", port));
let normalized_url = format!("{}://{}{}", scheme, host, port);