src/bin/proxmox-backup-manager.rs: use crate::tools::runtime::block_on()

This commit is contained in:
Dietmar Maurer 2020-02-26 11:37:38 +01:00
parent dd04383bb8
commit 03ac286c80

View File

@ -544,8 +544,7 @@ pub fn complete_remote_datastore_name(_arg: &str, param: &HashMap<String, String
options,
)?;
let mut rt = tokio::runtime::Runtime::new().unwrap();
let result = rt.block_on(client.get("api2/json/admin/datastore", None))?;
let result = crate::tools::runtime::block_on(client.get("api2/json/admin/datastore", None))?;
if let Some(data) = result["data"].as_array() {
for item in data {