Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
duckfromdiscord committed Feb 7, 2024
1 parent b26f443 commit e450ec3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
19 changes: 10 additions & 9 deletions src/discord/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,16 @@ impl BotData {
return Err(None);
}
let creds = MalojaCredentialsBuilder::new()
.https(https)
.skip_cert_verification(false)
.ip(parsed.host_str().unwrap().to_string())
.port(parsed.port().unwrap_or(match https {
true => 443,
false => 80,
}))
.path(parsed.path().to_string())
.build().unwrap();
.https(https)
.skip_cert_verification(false)
.ip(parsed.host_str().unwrap().to_string())
.port(parsed.port().unwrap_or(match https {
true => 443,
false => 80,
}))
.path(parsed.path().to_string())
.build()
.unwrap();
Ok(creds)
}
Err(error) => Err(Some(error)),
Expand Down
15 changes: 8 additions & 7 deletions src/hos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ pub fn get_maloja_creds_for_sid(
headers.insert("HOS-PASSWD".to_string(), passwd);
}
MalojaCredentialsBuilder::new()
.https(hos_server_https)
.skip_cert_verification(!hos_server_https)
.ip(hos_server_ip)
.port(hos_server_port)
.path("/sid/".to_owned() + &sid)
.headers(headers)
.build().unwrap()
.https(hos_server_https)
.skip_cert_verification(!hos_server_https)
.ip(hos_server_ip)
.port(hos_server_port)
.path("/sid/".to_owned() + &sid)
.headers(headers)
.build()
.unwrap()
}

0 comments on commit e450ec3

Please sign in to comment.