From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id D7FD11FF16E
	for <inbox@lore.proxmox.com>; Mon, 31 Mar 2025 15:51:49 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 130C973D8;
	Mon, 31 Mar 2025 15:51:37 +0200 (CEST)
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Mon, 31 Mar 2025 15:51:29 +0200
Message-Id: <20250331135131.127561-2-m.sandoval@proxmox.com>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250331135131.127561-1-m.sandoval@proxmox.com>
References: <20250331135131.127561-1-m.sandoval@proxmox.com>
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.097 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pve-devel] [PATCH 2/4] stop using captures trick
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

See https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 proxmox-ve-config/src/firewall/bridge.rs |  2 +-
 proxmox-ve-config/src/sdn/config.rs      | 12 ++++++------
 proxmox-ve-config/src/sdn/ipam.rs        |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/proxmox-ve-config/src/firewall/bridge.rs b/proxmox-ve-config/src/firewall/bridge.rs
index 4acb6fa..3a1fc30 100644
--- a/proxmox-ve-config/src/firewall/bridge.rs
+++ b/proxmox-ve-config/src/firewall/bridge.rs
@@ -36,7 +36,7 @@ impl Config {
         self.config.options.enable.unwrap_or(BRIDGE_ENABLED_DEFAULT)
     }
 
-    pub fn rules(&self) -> impl Iterator<Item = &Rule> + '_ {
+    pub fn rules(&self) -> impl Iterator<Item = &Rule> {
         self.config.rules.iter()
     }
 
diff --git a/proxmox-ve-config/src/sdn/config.rs b/proxmox-ve-config/src/sdn/config.rs
index 7ee1101..dc90f0f 100644
--- a/proxmox-ve-config/src/sdn/config.rs
+++ b/proxmox-ve-config/src/sdn/config.rs
@@ -288,7 +288,7 @@ impl SubnetConfig {
         self.name.cidr()
     }
 
-    pub fn dhcp_ranges(&self) -> impl Iterator<Item = &IpRange> + '_ {
+    pub fn dhcp_ranges(&self) -> impl Iterator<Item = &IpRange> {
         self.dhcp_range.iter()
     }
 }
@@ -332,7 +332,7 @@ impl VnetConfig {
         Ok(self.subnets.insert(*subnet.cidr(), subnet))
     }
 
-    pub fn subnets(&self) -> impl Iterator<Item = &SubnetConfig> + '_ {
+    pub fn subnets(&self) -> impl Iterator<Item = &SubnetConfig> {
         self.subnets.values()
     }
 
@@ -385,7 +385,7 @@ impl ZoneConfig {
         Ok(self.vnets.insert(vnet.name.clone(), vnet))
     }
 
-    pub fn vnets(&self) -> impl Iterator<Item = &VnetConfig> + '_ {
+    pub fn vnets(&self) -> impl Iterator<Item = &VnetConfig> {
         self.vnets.values()
     }
 
@@ -510,7 +510,7 @@ impl SdnConfig {
         self.zones.get(name)
     }
 
-    pub fn zones(&self) -> impl Iterator<Item = &ZoneConfig> + '_ {
+    pub fn zones(&self) -> impl Iterator<Item = &ZoneConfig> {
         self.zones.values()
     }
 
@@ -525,7 +525,7 @@ impl SdnConfig {
         None
     }
 
-    pub fn vnets(&self) -> impl Iterator<Item = (&ZoneConfig, &VnetConfig)> + '_ {
+    pub fn vnets(&self) -> impl Iterator<Item = (&ZoneConfig, &VnetConfig)> {
         self.zones()
             .flat_map(|zone| zone.vnets().map(move |vnet| (zone, vnet)))
     }
@@ -544,7 +544,7 @@ impl SdnConfig {
     pub fn ipsets<'a>(
         &'a self,
         filter: Option<&'a Allowlist<VnetName>>,
-    ) -> impl Iterator<Item = Ipset> + '_ {
+    ) -> impl Iterator<Item = Ipset> {
         self.zones
             .values()
             .flat_map(|zone| zone.vnets())
diff --git a/proxmox-ve-config/src/sdn/ipam.rs b/proxmox-ve-config/src/sdn/ipam.rs
index 598b835..0e6dd69 100644
--- a/proxmox-ve-config/src/sdn/ipam.rs
+++ b/proxmox-ve-config/src/sdn/ipam.rs
@@ -321,7 +321,7 @@ impl Ipam {
     ///
     /// It contains all IPs in all VNets, that a guest has stored in IPAM.
     /// Ipset name is of the form `guest-ipam-<vmid>`
-    pub fn ipsets(&self, filter: Option<&Allowlist<Vmid>>) -> impl Iterator<Item = Ipset> + '_ {
+    pub fn ipsets(&self, filter: Option<&Allowlist<Vmid>>) -> impl Iterator<Item = Ipset> {
         self.entries
             .iter()
             .flat_map(|(_, entries)| entries.iter())
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel