[pdm-devel] [PATCH proxmox-datacenter-manager 7/7] api: resources: rewrite let-else block with ?

Maximiliano Sandoval m.sandoval at proxmox.com
Mon Dec 29 17:18:42 CET 2025


This fixes the question_mark clippy lint.

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 server/src/api/resources.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/server/src/api/resources.rs b/server/src/api/resources.rs
index 654a4550..5d5fe2cc 100644
--- a/server/src/api/resources.rs
+++ b/server/src/api/resources.rs
@@ -1166,9 +1166,7 @@ pub(super) fn map_pve_network(
 ) -> Option<PveNetworkResource> {
     match resource.ty {
         ClusterResourceType::Network => {
-            let Some(network_type) = resource.network_type else {
-                return None;
-            };
+            let network_type = resource.network_type?;
 
             let id = format!("remote/{remote}/{}", &resource.id);
             let node = resource.node.unwrap_or_default();
-- 
2.47.3





More information about the pdm-devel mailing list