From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id DEBAB1FF17E for ; Thu, 30 Oct 2025 14:30:24 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4B2B2216C4; Thu, 30 Oct 2025 14:30:57 +0100 (CET) Mime-Version: 1.0 Date: Thu, 30 Oct 2025 14:30:24 +0100 Message-Id: From: "Lukas Wagner" To: "Shannon Sterz" , "Lukas Wagner" X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20251029144902.446852-1-l.wagner@proxmox.com> <20251029144902.446852-6-l.wagner@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1761831011035 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.027 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 RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pdm-devel] [PATCH datacenter-manager 05/13] views: add implementation for view filters X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Cc: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" On Thu Oct 30, 2025 at 12:44 PM CET, Shannon Sterz wrote: >> +impl<'a> From<&'a Resource> for ResourceData<'a> { >> + fn from(value: &'a Resource) -> Self { >> + match value { >> + Resource::PveStorage(_) => ResourceData { >> + resource_type: value.resource_type(), >> + tags: None, >> + resource_pool: None, >> + resource_id: value.global_id(), >> + }, >> + Resource::PveQemu(resource) => ResourceData { >> + resource_type: value.resource_type(), >> + tags: Some(&resource.tags), >> + resource_pool: Some(&resource.pool), >> + resource_id: value.global_id(), >> + }, >> + Resource::PveLxc(resource) => ResourceData { >> + resource_type: value.resource_type(), >> + tags: Some(&resource.tags), >> + resource_pool: Some(&resource.pool), >> + resource_id: value.global_id(), >> + }, >> + Resource::PveNode(_) => ResourceData { >> + resource_type: value.resource_type(), >> + tags: None, >> + resource_pool: None, >> + resource_id: value.global_id(), >> + }, >> + Resource::PveSdn(_) => ResourceData { >> + resource_type: value.resource_type(), >> + tags: None, >> + resource_pool: None, >> + resource_id: value.global_id(), >> + }, >> + Resource::PbsNode(_) => ResourceData { >> + resource_type: value.resource_type(), >> + tags: None, >> + resource_pool: None, >> + resource_id: value.global_id(), >> + }, >> + Resource::PbsDatastore(_) => ResourceData { >> + resource_type: value.resource_type(), >> + tags: None, >> + resource_pool: None, >> + resource_id: value.global_id(), >> + }, >> + } >> + } >> +} > > nit: imo this would be fine to group this a match statement a bit. i.e. > PveStorage, PveNode, PveSdn, PbsNode and PbsDatastore have essentially > the same arm here. could be simply or-ed (|) > Ah, yes, of course! Will be fixed in the next version. Thanks! _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel