all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] system-report: fix 'unused Result' warning
@ 2023-11-24  8:28 Lukas Wagner
  2023-11-24 11:22 ` Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2023-11-24  8:28 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Lukas Wagner <l.wagner@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
         }
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-24 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-24  8:28 [pbs-devel] [PATCH proxmox-backup] system-report: fix 'unused Result' warning Lukas Wagner
2023-11-24 11:22 ` Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal