From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/2] daily-update: inline variables into format string if possible
Date: Mon, 25 Mar 2024 11:50:45 +0100 [thread overview]
Message-ID: <20240325105045.139258-2-l.wagner@proxmox.com> (raw)
In-Reply-To: <20240325105045.139258-1-l.wagner@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
src/bin/proxmox-daily-update.rs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/bin/proxmox-daily-update.rs b/src/bin/proxmox-daily-update.rs
index cde9ff80..1834fc44 100644
--- a/src/bin/proxmox-daily-update.rs
+++ b/src/bin/proxmox-daily-update.rs
@@ -28,7 +28,7 @@ async fn do_update(rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> {
match method.handler {
ApiHandler::Sync(handler) => {
if let Err(err) = (handler)(param.clone(), method, rpcenv) {
- log::error!("Error checking subscription - {}", err);
+ log::error!("Error checking subscription - {err}");
}
}
_ => unreachable!(),
@@ -36,7 +36,7 @@ async fn do_update(rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> {
let notify = match api2::node::subscription::get_subscription(param, rpcenv) {
Ok(info) => info.status == SubscriptionStatus::Active,
Err(err) => {
- log::error!("Error reading subscription - {}", err);
+ log::error!("Error reading subscription - {err}");
false
}
};
@@ -48,7 +48,7 @@ async fn do_update(rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> {
match method.handler {
ApiHandler::Sync(handler) => match (handler)(param, method, rpcenv) {
Err(err) => {
- log::error!("Error triggering apt database update - {}", err);
+ log::error!("Error triggering apt database update - {err}");
}
Ok(upid) => wait_for_local_worker(upid.as_str().unwrap()).await?,
},
@@ -58,7 +58,7 @@ async fn do_update(rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> {
match check_acme_certificates(rpcenv).await {
Ok(()) => (),
Err(err) => {
- log::error!("error checking certificates: {}", err);
+ log::error!("error checking certificates: {err}");
}
}
@@ -118,14 +118,14 @@ fn main() {
log::LevelFilter::Info,
Some("proxmox-daily-update"),
) {
- eprintln!("unable to initialize syslog - {}", err);
+ eprintln!("unable to initialize syslog - {err}");
}
let mut rpcenv = CliEnvironment::new();
rpcenv.set_auth_id(Some(String::from("root@pam")));
if let Err(err) = proxmox_async::runtime::main(run(&mut rpcenv)) {
- log::error!("error during update: {}", err);
+ log::error!("error during update: {err}");
std::process::exit(1);
}
}
--
2.39.2
next prev parent reply other threads:[~2024-03-25 10:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 10:50 [pbs-devel] [PATCH proxmox-backup 1/2] daily-update: fix typo Lukas Wagner
2024-03-25 10:50 ` Lukas Wagner [this message]
2024-03-25 15:11 ` [pbs-devel] applied-series: " 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=20240325105045.139258-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox