mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-30 07:08:32 +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();
|
let now = proxmox::tools::time::epoch_i64();
|
||||||
// time format which apache/nginx use (by default), copied from pve-http-server
|
// 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)
|
let datetime = proxmox::tools::time::strftime_local("%d/%m/%Y:%H:%M:%S %z", now)
|
||||||
.unwrap_or("-".into());
|
.unwrap_or_else(|_| "-".to_string());
|
||||||
|
|
||||||
logfile
|
logfile
|
||||||
.lock()
|
.lock()
|
||||||
@ -161,7 +161,7 @@ fn log_response(
|
|||||||
path,
|
path,
|
||||||
status.as_str(),
|
status.as_str(),
|
||||||
resp.body().size_hint().lower(),
|
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