[pbs-devel] [PATCH proxmox-backup] system-report: fix 'unused Result' warning

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Nov 24 12:22:42 CET 2023


Am 24/11/2023 um 09:28 schrieb Lukas Wagner:
> Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
> ---
>  src/server/report.rs | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/server/report.rs b/src/server/report.rs
> index 703daa71..ea31cbf9 100644
> --- a/src/server/report.rs
> +++ b/src/server/report.rs
> @@ -162,7 +162,11 @@ fn get_command_output(exe: &str, args: &Vec<&str>) -> String {
>                  .trim_end()
>                  .to_string();
>              if !stderr.is_empty() {
> -                writeln!(out, "\n```\nSTDERR:\n```\n{stderr}");
> +                // Does not really make sense to append any error
> +                // to 'out' - since that write would probably fail
> +                // too... also, AFAICT this should never fail -
> +                // in case of OOM, Rust will simply abort
> +                let _ = writeln!(out, "\n```\nSTDERR:\n```\n{stderr}");
>              }
>              out
>          }

yikes, I actually wanted to fix that before pushing those changes out, meh.

Thanks for sending a patch, I also noticed the warning again when testing
Stefan Lendls prune job series and pushed a fix directly (without comment
as we do that quite a few times already)





More information about the pbs-devel mailing list