]> git.proxmox.com Git - proxmox-backup.git/blobdiff - pbs-config/src/traffic_control.rs
tree-wide: fix needless borrows
[proxmox-backup.git] / pbs-config / src / traffic_control.rs
index ac88706947b4c5e9a0166d8b80310ce4e1ac2a1d..860d0fb7a2a01ff7dcce3145e75a86387782c575 100644 (file)
@@ -54,7 +54,7 @@ pub fn config() -> Result<(SectionConfigData, [u8;32]), Error> {
 
 /// Save the configuration file
 pub fn save_config(config: &SectionConfigData) -> Result<(), Error> {
-    let raw = CONFIG.write(TRAFFIC_CONTROL_CFG_FILENAME, &config)?;
+    let raw = CONFIG.write(TRAFFIC_CONTROL_CFG_FILENAME, config)?;
     replace_backup_config(TRAFFIC_CONTROL_CFG_FILENAME, raw.as_bytes())?;
 
     // increase traffic control version
@@ -88,7 +88,7 @@ mod test {
  timeframe mon..wed 8:00-16:30
  timeframe fri 9:00-12:00
 ";
-        let data = CONFIG.parse(TRAFFIC_CONTROL_CFG_FILENAME, &content)?;
+        let data = CONFIG.parse(TRAFFIC_CONTROL_CFG_FILENAME, content)?;
         eprintln!("GOT {:?}", data);
 
         Ok(())