[pbs-devel] [PATCH proxmox-backup 2/2] node: status: declutter kernel-version

Dietmar Maurer dietmar at proxmox.com
Thu Nov 23 17:15:49 CET 2023


> +    let kversion = KernelVersionInformation {
> +        sysname: uname.sysname().to_os_string().into_string().unwrap(),
> +        release: uname.release().to_os_string().into_string().unwrap(),
> +        version: uname.version().to_os_string().into_string().unwrap(),
> +        machine: uname.machine().to_os_string().into_string().unwrap(),
> +    };

Is it really safe to use unwrap here? If so, I normally add a short
comment to the code to explain why.





More information about the pbs-devel mailing list