http: concat! user agent instead of format!

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2024-01-15 11:17:57 +01:00
parent 3c453f7468
commit fe8b11eeec

View File

@ -21,8 +21,8 @@ impl Client {
fn agent(&self) -> Result<ureq::Agent, Error> {
let mut builder = ureq::AgentBuilder::new();
builder = builder.user_agent(self.options.user_agent.as_deref().unwrap_or(&format!(
"proxmox-sync-http-client/{}",
builder = builder.user_agent(self.options.user_agent.as_deref().unwrap_or(concat!(
"proxmox-sync-http-client/",
env!("CARGO_PKG_VERSION")
)));