cargo fmt (#303)

This commit is contained in:
Martin Algesten
2021-01-17 20:07:52 +01:00
committed by GitHub
parent 4aadda8ad3
commit 06abdff4bf
2 changed files with 14 additions and 3 deletions

View File

@@ -80,7 +80,8 @@ impl Unit {
let username = url.username();
let password = url.password().unwrap_or("");
if (!username.is_empty() || !password.is_empty()) && get_header(&headers, "authorization").is_none()
if (!username.is_empty() || !password.is_empty())
&& get_header(&headers, "authorization").is_none()
{
let encoded = base64::encode(&format!("{}:{}", username, password));
extra.push(Header::new("Authorization", &format!("Basic {}", encoded)));