[pdm-devel] [PATCH yew-comp 3/7] utils: factor out task description into own function
Dominik Csapak
d.csapak at proxmox.com
Tue Jan 21 10:44:28 CET 2025
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(),
>> }
>> }
>> }
>
More information about the pdm-devel
mailing list