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 442521FF16B for ; Thu, 28 Nov 2024 14:14:59 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7C62B5879; Thu, 28 Nov 2024 14:15:01 +0100 (CET) Message-ID: Date: Thu, 28 Nov 2024 14:14:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Thomas Lamprecht , Proxmox Backup Server development discussion References: <20241128124925.318298-1-c.ebner@proxmox.com> <8fb89fb5-0def-4b39-a30e-00193958bc16@proxmox.com> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <8fb89fb5-0def-4b39-a30e-00193958bc16@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.030 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: Re: [pbs-devel] [PATCH proxmox-backup 1/2] api types: version: add helper for min version checks X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" On 11/28/24 14:10, Thomas Lamprecht wrote: > Why not impl the Ord trait here instead? > > Then the call-site could be > > let supports_prune_delete_stats = api_version >= ApiVersion::new(3, 2, 11, String::new()); Ah, yes that's way nicer and allows also for exact version matching. > And maybe a separate type for the triple without the commit hash on which you > also impl the same and then avoid that slightly confusing String::new() hack. Acked, will send a new version incorporating your feedback, thanks! _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel