]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/api2/node/dns.rs
tree-wide: fix needless borrows
[proxmox-backup.git] / src / api2 / node / dns.rs
index 18312e31a3d4adade08e3db4a15ea9b5902beb90..8e4d4adaa0a168c289bc22ccef5c92a0c2c85bbb 100644 (file)
@@ -55,9 +55,9 @@ pub fn read_etc_resolv_conf() -> Result<Value, Error> {
 
     for line in data.lines() {
 
-        if let Some(caps) = DOMAIN_REGEX.captures(&line) {
+        if let Some(caps) = DOMAIN_REGEX.captures(line) {
             result["search"] = Value::from(&caps[1]);
-        } else if let Some(caps) = SERVER_REGEX.captures(&line) {
+        } else if let Some(caps) = SERVER_REGEX.captures(line) {
             nscount += 1;
             if nscount > 3 { continue };
             let nameserver = &caps[1];