derive/impl and use Default for some structs
and revamp HttpClientOptions with two constructors for the common use cases Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
f4e52bb27d
commit
93e3581ce7
@ -310,9 +310,7 @@ pub fn delete_remote(name: String, digest: Option<String>) -> Result<(), Error>
|
||||
|
||||
/// Helper to get client for remote.cfg entry
|
||||
pub async fn remote_client(remote: remote::Remote) -> Result<HttpClient, Error> {
|
||||
let options = HttpClientOptions::new()
|
||||
.password(Some(remote.password.clone()))
|
||||
.fingerprint(remote.fingerprint.clone());
|
||||
let options = HttpClientOptions::new_non_interactive(remote.password.clone(), remote.fingerprint.clone());
|
||||
|
||||
let client = HttpClient::new(
|
||||
&remote.host,
|
||||
|
Reference in New Issue
Block a user