src/api2/pull.rs: use reference to remote configuration

This commit is contained in:
Dietmar Maurer
2020-01-16 13:54:29 +01:00
parent 625d19621f
commit 94609e2380
2 changed files with 11 additions and 23 deletions

View File

@ -417,15 +417,10 @@ async fn pull_datastore(
let mut client = connect()?;
let (remote_config, _digest) = remotes::config()?;
let remote: Remote = remote_config.lookup("remote", &remote)?;
let args = json!({
"store": local_store,
"remote-host": remote.host,
"remote-user": remote.userid,
"remote": remote,
"remote-store": remote_store,
"remote-password": remote.password,
});
let result = client.post("api2/json/pull", Some(args)).await?;