]> git.proxmox.com Git - proxmox-backup.git/commitdiff
src/bin/proxmox-backup-manager.rs: use crate::tools::runtime::block_on()
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 26 Feb 2020 10:37:38 +0000 (11:37 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 26 Feb 2020 10:37:38 +0000 (11:37 +0100)
src/bin/proxmox-backup-manager.rs

index c567f19264fa376696b6a1edb74772f90294b266..2f0e01f455749faaa2d189665581aad48be8c640 100644 (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 {