]> git.proxmox.com Git - proxmox-backup.git/commitdiff
src/api2/config/remotes.rs: fix variable name -> s/remote/id/
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 14 Jan 2020 12:20:13 +0000 (13:20 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 14 Jan 2020 12:20:13 +0000 (13:20 +0100)
src/section_config.rs

index 50fd81cc7e74a38b7d466cef5c946929cd0d15bc..0bee518e7975acac94623f5286a7d1dad8e0e1d6 100644 (file)
@@ -61,17 +61,17 @@ impl SectionConfigData {
         Ok(())
     }
 
-    pub fn lookup<T: DeserializeOwned>(&self, type_name: &str, remote: &str) -> Result<T, Error> {
+    pub fn lookup<T: DeserializeOwned>(&self, type_name: &str, id: &str) -> Result<T, Error> {
 
-        let config = match self.sections.get(remote) {
+        let config = match self.sections.get(id) {
             Some((section_type_name, config)) => {
                 if type_name != section_type_name {
-                    bail!("got unexpected type '{}' for {} '{}'", section_type_name, type_name, remote);
+                    bail!("got unexpected type '{}' for {} '{}'", section_type_name, type_name, id);
                 }
                 config
             }
             None => {
-                bail!("no such {} '{}'", type_name, remote);
+                bail!("no such {} '{}'", type_name, id);
             }
         };