tree-wide: fix needless borrows
found and fixed via clippy Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
@ -185,7 +185,7 @@ pub(crate) fn set_proxy_certificate(cert_pem: &[u8], key_pem: &[u8]) -> Result<(
|
||||
create_configdir()?;
|
||||
pbs_config::replace_backup_config(&key_path, key_pem)
|
||||
.map_err(|err| format_err!("error writing certificate private key - {}", err))?;
|
||||
pbs_config::replace_backup_config(&cert_path, &cert_pem)
|
||||
pbs_config::replace_backup_config(&cert_path, cert_pem)
|
||||
.map_err(|err| format_err!("error writing certificate file - {}", err))?;
|
||||
|
||||
Ok(())
|
||||
|
@ -141,7 +141,7 @@ impl NodeConfig {
|
||||
/// Returns the parsed ProxyConfig
|
||||
pub fn http_proxy(&self) -> Option<ProxyConfig> {
|
||||
if let Some(http_proxy) = &self.http_proxy {
|
||||
match ProxyConfig::parse_proxy_url(&http_proxy) {
|
||||
match ProxyConfig::parse_proxy_url(http_proxy) {
|
||||
Ok(proxy) => Some(proxy),
|
||||
Err(_) => None,
|
||||
}
|
||||
|
Reference in New Issue
Block a user