From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] system-report: fix 'unused Result' warning
Date: Fri, 24 Nov 2023 09:28:19 +0100 [thread overview]
Message-ID: <20231124082819.46802-1-l.wagner@proxmox.com> (raw)
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
next reply other threads:[~2023-11-24 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 8:28 Lukas Wagner [this message]
2023-11-24 11:22 ` Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231124082819.46802-1-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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