[pve-devel] [PATCH proxmox-apt 1/3] code cleanup: use contains()

Fabian Ebner f.ebner at proxmox.com
Mon Jul 5 15:50:28 CEST 2021


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 src/repositories/file.rs | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/repositories/file.rs b/src/repositories/file.rs
index 447fd0a..49cc358 100644
--- a/src/repositories/file.rs
+++ b/src/repositories/file.rs
@@ -304,11 +304,7 @@ impl APTRepositoryFile {
         let mut infos = vec![];
 
         for (n, repo) in self.repositories.iter().enumerate() {
-            if !repo
-                .types
-                .iter()
-                .any(|package_type| *package_type == APTRepositoryPackageType::Deb)
-            {
+            if !repo.types.contains(&APTRepositoryPackageType::Deb) {
                 continue;
             }
 
-- 
2.30.2






More information about the pve-devel mailing list