From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pdm-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id 110091FF168
	for <inbox@lore.proxmox.com>; Tue, 21 Jan 2025 10:45:04 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 1D6B25640;
	Tue, 21 Jan 2025 10:45:02 +0100 (CET)
Message-ID: <70bd9220-83ea-4746-a3d1-a42cfc2a960d@proxmox.com>
Date: Tue, 21 Jan 2025 10:44:28 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird Beta
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
 Proxmox Datacenter Manager development discussion
 <pdm-devel@lists.proxmox.com>
References: <20250120093006.927014-1-d.csapak@proxmox.com>
 <20250120093006.927014-4-d.csapak@proxmox.com>
 <09f7f5f7-309d-4206-8959-c49d247dd251@proxmox.com>
Content-Language: en-US
From: Dominik Csapak <d.csapak@proxmox.com>
In-Reply-To: <09f7f5f7-309d-4206-8959-c49d247dd251@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.020 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: [pdm-devel] [PATCH yew-comp 3/7] utils: factor out task
 description into own function
X-BeenThere: pdm-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Datacenter Manager development discussion
 <pdm-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pdm-devel>, 
 <mailto:pdm-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pdm-devel/>
List-Post: <mailto:pdm-devel@lists.proxmox.com>
List-Help: <mailto:pdm-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel>, 
 <mailto:pdm-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox Datacenter Manager development discussion
 <pdm-devel@lists.proxmox.com>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: pdm-devel-bounces@lists.proxmox.com
Sender: "pdm-devel" <pdm-devel-bounces@lists.proxmox.com>

On 1/20/25 18:29, Thomas Lamprecht wrote:
> Am 20.01.25 um 10:29 schrieb Dominik Csapak:
>> +/// Formats the given worker type and id to a Human readable task description
>> +pub fn format_task_description(worker_type: &str, worker_id: Option<&str>) -> String {
>> +    if let Some(text) = lookup_task_description(worker_type, worker_id) {
>> +        text
>> +    } else {
>> +        match worker_id {
>> +            Some(id) => format!("{} {}", worker_type, id),
> 
> nit: please inline the variables into the format string where possible and
> when touching the code anyway.

yeah sorry I overlooked that. Should I send a follow up for this now or
should i leave it and adapt when we have to change it the next time around?

> 
>> +            None => worker_type.to_string(),
>>           }
>>       }
>>   }
> 



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