mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-29 00:56:52 +00:00
clippy: us *_or_else with function calls
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
724e2f47f9
commit
ba81db7848
@ -147,7 +147,7 @@ fn log_response(
|
||||
let now = proxmox::tools::time::epoch_i64();
|
||||
// time format which apache/nginx use (by default), copied from pve-http-server
|
||||
let datetime = proxmox::tools::time::strftime_local("%d/%m/%Y:%H:%M:%S %z", now)
|
||||
.unwrap_or("-".into());
|
||||
.unwrap_or_else(|_| "-".to_string());
|
||||
|
||||
logfile
|
||||
.lock()
|
||||
@ -161,7 +161,7 @@ fn log_response(
|
||||
path,
|
||||
status.as_str(),
|
||||
resp.body().size_hint().lower(),
|
||||
user_agent.unwrap_or("-".into()),
|
||||
user_agent.unwrap_or_else(|| "-".to_string()),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user